about summary refs log tree commit diff
path: root/pkgs/by-name/im
diff options
context:
space:
mode:
authorSomeone Serge <else@someonex.net>2024-05-27 15:12:56 +0000
committerSomeone Serge <else@someonex.net>2024-05-28 19:58:02 +0000
commitf85b1c7faa8a4c7eb5a17f8c15215ed7827f87cb (patch)
tree304950e8863496643a4031aa48e3e6ab96a8585e /pkgs/by-name/im
parentfdf0e19b73f0f25818c72551a7eb5b2e3e73821e (diff)
imnodes: init at unstable
Diffstat (limited to 'pkgs/by-name/im')
-rw-r--r--pkgs/by-name/im/imnodes/package.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/by-name/im/imnodes/package.nix b/pkgs/by-name/im/imnodes/package.nix
new file mode 100644
index 0000000000000..bdaafa5fe335b
--- /dev/null
+++ b/pkgs/by-name/im/imnodes/package.nix
@@ -0,0 +1,56 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchpatch,
+  cmake,
+  imgui,
+  SDL2,
+  xorg,
+  imnodes,
+  withExamples ? false,
+}:
+
+stdenv.mkDerivation rec {
+  pname = "imnodes";
+  version = "unstable-2024-03-12";
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  src = fetchFromGitHub {
+    owner = "Nelarius";
+    repo = "imnodes";
+    rev = "8563e1655bd9bb1f249e6552cc6274d506ee788b";
+    hash = "sha256-E7NNCxYq9dyVvutWbpl2a+D2Ap2ErvdYHBDqpX0kb0c=";
+  };
+  patches = [
+    # CMake install rules
+    (fetchpatch {
+      url = "https://github.com/Nelarius/imnodes/commit/ff20336fcd82ce07c39fabd76d5bc9fa0a08b3bc.patch";
+      hash = "sha256-JHOUjwMofDwt2kg6SLPFZmuQC4bOfjGa3qHFr5MdPIE=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs =
+    [ imgui ]
+    ++ lib.optionals withExamples [
+      SDL2
+      xorg.libXext
+    ];
+
+  cmakeFlags = [ (lib.cmakeBool "IMNODES_EXAMPLES" withExamples) ];
+
+  passthru.tests.examples = imnodes.override { withExamples = true; };
+
+  meta = with lib; {
+    description = "A small, dependency-free node editor for dear imgui";
+    homepage = "https://github.com/Nelarius/imnodes";
+    license = licenses.mit;
+    maintainers = with maintainers; [ SomeoneSerge ];
+    mainProgram = "imnodes";
+    platforms = platforms.all;
+  };
+}