slurm: make nvml configurable

This commit is contained in:
Edward Tjörnhammar
2025-01-28 12:12:26 +00:00
parent 64dad1282c
commit 87b4b84885
2 changed files with 18 additions and 2 deletions
+14 -2
View File
@@ -2,6 +2,8 @@
lib,
stdenv,
fetchFromGitHub,
runCommand,
config,
pkg-config,
libtool,
curl,
@@ -33,6 +35,8 @@
enableX11 ? true,
enableGtk2 ? false,
gtk2,
enableNVML ? config.cudaSupport,
nvml,
}:
stdenv.mkDerivation rec {
@@ -113,7 +117,14 @@ stdenv.mkDerivation rec {
http-parser
]
++ lib.optionals enableX11 [ xorg.xauth ]
++ lib.optionals enableGtk2 [ gtk2 ];
++ lib.optionals enableGtk2 [ gtk2 ]
++ lib.optionals enableNVML [
(runCommand "collect-nvml" { } ''
mkdir $out
ln -s ${nvml.dev}/include $out/include
ln -s ${nvml.lib}/lib/stubs $out/lib
'')
];
configureFlags =
[
@@ -132,7 +143,8 @@ stdenv.mkDerivation rec {
"--without-rpath" # Required for configure to pick up the right dlopen path
]
++ (lib.optional enableGtk2 "--disable-gtktest")
++ (lib.optional (!enableX11) "--disable-x11");
++ (lib.optional (!enableX11) "--disable-x11")
++ (lib.optional (enableNVML) "--with-nvml");
preConfigure = ''
patchShebangs ./doc/html/shtml2html.py
+4
View File
@@ -8285,6 +8285,10 @@ with pkgs;
sloc = nodePackages.sloc;
slurm = callPackage ../by-name/sl/slurm/package.nix {
nvml = cudaPackages.cuda_nvml_dev;
};
snowman = qt5.callPackage ../development/tools/analysis/snowman { };
sparse = callPackage ../development/tools/analysis/sparse {