19 stdenv.mkDerivation rec {
20 pname = "implot-demos";
21 version = "unstable-2023-08-20";
23 src = fetchFromGitHub {
25 repo = "implot_demos";
26 rev = "f33219d3ade192a2333d4a32e749842010952a29";
27 hash = "sha256-Xq0kVk8qncj/BzQyIX/l1OLvPSQJU8ckTxIIfLZdO/g=";
31 # Resolve "undefined symbols" (GetWindowContentRegionWidth &c)
33 url = "https://github.com/epezent/implot_demos/commit/85a59612c102f8da97d6ead04f528f4c88f4ef9a.patch";
34 hash = "sha256-HRhfC3TUwz9Mv+1ODabaDxTWUaj4Nx1iH7C6vjUPo2s=";
37 # CMake: make FetchContent optional, add install targets
39 url = "https://github.com/epezent/implot_demos/commit/4add0433a46ed5e2099e1af1a77e8055e49230d0.patch";
40 hash = "sha256-jYdM8NuwbZk7INKo2wqMAbjLMTPdrAdM4Kr3xmtquIY=";
43 # CMake: link libGL from the "app" target
45 url = "https://github.com/epezent/implot_demos/commit/6742e4202858eb85bd0d67ca5fa15a7a07e6b618.patch";
46 hash = "sha256-h4EJ9u1iHLYkGHgxSynskkuCGmY6mmvKdZSRwHJKerY=";
50 cmakeFlags = [ (lib.cmakeBool "FETCHCONTENT_FULLY_DISCONNECTED" true) ];
67 ++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3 ]
68 ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ];
71 description = "Standalone ImPlot Demos";
72 homepage = "https://github.com/epezent/implot_demos";
74 stdenv.hostPlatform.isAarch64 # Target "mandel" relies on AVX2
75 || stdenv.hostPlatform.isDarwin;
76 license = lib.licenses.mit;
77 maintainers = with lib.maintainers; [ SomeoneSerge ];
78 mainProgram = "implot-demos";
79 platforms = lib.platforms.all;