packages.matplotplusplus: restore opengl support

This commit is contained in:
2024-09-06 15:47:26 +08:00
parent 4fd2a7973d
commit 3cba0619d8
2 changed files with 17 additions and 6 deletions

View File

@@ -9,7 +9,11 @@ inputs: rec
concurrencpp = inputs.pkgs.callPackage ./concurrencpp.nix { src = inputs.topInputs.concurrencpp; };
eigengdb = inputs.pkgs.python3Packages.callPackage ./eigengdb.nix {};
nodesoup = inputs.pkgs.callPackage ./nodesoup.nix { src = inputs.topInputs.nodesoup; };
matplotplusplus = inputs.pkgs.callPackage ./matplotplusplus.nix { src = inputs.topInputs.matplotplusplus; };
matplotplusplus = inputs.pkgs.callPackage ./matplotplusplus.nix
{
inherit glad nodesoup;
src = inputs.topInputs.matplotplusplus;
};
zpp-bits = inputs.pkgs.callPackage ./zpp-bits.nix { src = inputs.topInputs.zpp-bits; };
eigen = inputs.pkgs.callPackage ./eigen.nix { src = inputs.topInputs.eigen; };
nameof = inputs.pkgs.callPackage ./nameof.nix { src = inputs.topInputs.nameof; };

View File

@@ -1,11 +1,18 @@
{
stdenv, src, cmake, pkg-config,
libjpeg, libtiff, zlib, libpng
stdenv, src, cmake, pkg-config, substituteAll,
gnuplot, libjpeg, libtiff, zlib, libpng, lapack, blas, fftw, opencv, nodesoup, cimg, glfw, libGL, python3, glad
}: stdenv.mkDerivation
{
name = "matplotplusplus";
inherit src;
cmakeFlags = [ "-DMATPLOTPP_BUILD_EXAMPLES=OFF" "-DMATPLOTPP_BUILD_TESTS=OFF" ];
buildInputs = [ libjpeg libtiff zlib libpng ];
nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags =
[
"-DBUILD_SHARED_LIBS=ON" "-DMATPLOTPP_BUILD_SHARED_LIBS=ON" "-DMATPLOTPP_BUILD_EXAMPLES=OFF"
"-DMATPLOTPP_WITH_SYSTEM_NODESOUP=ON" "-DMATPLOTPP_WITH_SYSTEM_CIMG=ON"
"-DMATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=ON" "-DGLAD_REPRODUCIBLE=ON"
];
buildInputs = [ gnuplot libjpeg libtiff zlib libpng lapack blas fftw opencv nodesoup cimg glfw libGL glad ];
nativeBuildInputs = [ cmake pkg-config python3 ];
propagatedBuildInputs = [ libGL glad glfw ];
propagatedNativeBuildInputs = [ python3 ];
}