implot.tests: init
This commit is contained in:
parent
e68afc9dc4
commit
227e1e98b4
78
pkgs/by-name/im/implot/demos/default.nix
Normal file
78
pkgs/by-name/im/implot/demos/default.nix
Normal file
@ -0,0 +1,78 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
pkg-config,
|
||||
darwin,
|
||||
fmt,
|
||||
gtk3,
|
||||
iir1,
|
||||
imgui,
|
||||
imnodes,
|
||||
implot,
|
||||
openssl,
|
||||
curl,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "implot-demos";
|
||||
version = "unstable-2023-08-20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "epezent";
|
||||
repo = "implot_demos";
|
||||
rev = "f33219d3ade192a2333d4a32e749842010952a29";
|
||||
hash = "sha256-Xq0kVk8qncj/BzQyIX/l1OLvPSQJU8ckTxIIfLZdO/g=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Resolve "undefined symbols" (GetWindowContentRegionWidth &c)
|
||||
(fetchpatch {
|
||||
url = "https://github.com/epezent/implot_demos/commit/85a59612c102f8da97d6ead04f528f4c88f4ef9a.patch";
|
||||
hash = "sha256-HRhfC3TUwz9Mv+1ODabaDxTWUaj4Nx1iH7C6vjUPo2s=";
|
||||
})
|
||||
|
||||
# CMake: make FetchContent optional, add install targets
|
||||
(fetchpatch {
|
||||
url = "https://github.com/epezent/implot_demos/commit/4add0433a46ed5e2099e1af1a77e8055e49230d0.patch";
|
||||
hash = "sha256-jYdM8NuwbZk7INKo2wqMAbjLMTPdrAdM4Kr3xmtquIY=";
|
||||
})
|
||||
|
||||
# CMake: link libGL from the "app" target
|
||||
(fetchpatch {
|
||||
url = "https://github.com/epezent/implot_demos/commit/6742e4202858eb85bd0d67ca5fa15a7a07e6b618.patch";
|
||||
hash = "sha256-h4EJ9u1iHLYkGHgxSynskkuCGmY6mmvKdZSRwHJKerY=";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [ (lib.cmakeBool "FETCHCONTENT_FULLY_DISCONNECTED" true) ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
curl
|
||||
fmt
|
||||
iir1
|
||||
imgui
|
||||
imnodes
|
||||
implot
|
||||
openssl
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3 ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.AppKit ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Standalone ImPlot Demos";
|
||||
homepage = "https://github.com/epezent/implot_demos";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ SomeoneSerge ];
|
||||
mainProgram = "implot-demos";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -27,6 +27,10 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ imgui ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
passthru.tests = {
|
||||
implot-demos = callPackage ./demos { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Immediate Mode Plotting";
|
||||
homepage = "https://github.com/epezent/implot";
|
||||
|
Loading…
Reference in New Issue
Block a user