about summary refs log tree commit diff
path: root/pkgs/development/libraries/imgui/demo/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/imgui/demo/default.nix')
-rw-r--r--pkgs/development/libraries/imgui/demo/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/libraries/imgui/demo/default.nix b/pkgs/development/libraries/imgui/demo/default.nix
new file mode 100644
index 0000000000000..a250155758aa3
--- /dev/null
+++ b/pkgs/development/libraries/imgui/demo/default.nix
@@ -0,0 +1,29 @@
+{
+  lib,
+  stdenv,
+  cmake,
+  imgui,
+}:
+
+stdenv.mkDerivation {
+  pname = "${imgui.pname}-demo";
+  inherit (imgui) version;
+
+  src = "${imgui.src}/examples/example_glfw_opengl3";
+  postPatch = ''
+    rm Makefile*
+    cp ${./CMakeLists.txt} CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ (imgui.override { IMGUI_BUILD_GLFW_BINDING = true; }) ];
+
+  meta = with lib; {
+    description = "Standalone ImPlot Demos";
+    homepage = "https://github.com/ocornut/imgui/tree/master/examples/example_glfw_opengl3";
+    license = licenses.mit;
+    maintainers = with maintainers; [ SomeoneSerge ];
+    mainProgram = "demo";
+    platforms = lib.platforms.linux;
+  };
+}