diff --git a/pkgs/by-name/sl/slurm/package.nix b/pkgs/by-name/sl/slurm/package.nix index 7912050f5bea..96e3ce98b91f 100644 --- a/pkgs/by-name/sl/slurm/package.nix +++ b/pkgs/by-name/sl/slurm/package.nix @@ -22,7 +22,7 @@ numactl, readline, freeipmi, - xorg, + xauth, lz4, rdma-core, nixosTests, @@ -37,7 +37,7 @@ nvml, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "slurm"; version = "25.05.3.1"; @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { owner = "SchedMD"; repo = "slurm"; # The release tags use - instead of . - rev = "${pname}-${builtins.replaceStrings [ "." ] [ "-" ] version}"; + rev = "slurm-${builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.version}"; hash = "sha256-W/q9eN4Ov3pxp2qyr3b7G4ayDaNtFUPQeAcOHCB23Q8="; }; @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { prePatch = '' substituteInPlace src/common/env.c \ - --replace "/bin/echo" "${coreutils}/bin/echo" + --replace "/bin/echo" "${lib.getExe' coreutils "echo"}" # Autoconf does not support split packages for pmix (libs and headers). # Fix the path to the pmix libraries, so dlopen can find it. @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { '' + (lib.optionalString enableX11 '' substituteInPlace src/common/x11_util.c \ - --replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"' + --replace '"/usr/bin/xauth"' '"${lib.getExe xauth}"' ''); # nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode' @@ -106,12 +106,12 @@ stdenv.mkDerivation rec { libbpf http-parser ] - ++ lib.optionals enableX11 [ xorg.xauth ] + ++ lib.optionals enableX11 [ xauth ] ++ lib.optionals enableNVML [ (runCommand "collect-nvml" { } '' mkdir $out - ln -s ${nvml.dev}/include $out/include - ln -s ${nvml.lib}/lib/stubs $out/lib + ln -s ${lib.getDev nvml}/include $out/include + ln -s ${lib.getLib nvml}/lib/stubs $out/lib '') ]; @@ -146,14 +146,14 @@ stdenv.mkDerivation rec { passthru.tests.slurm = nixosTests.slurm; - meta = with lib; { + meta = { homepage = "http://www.schedmd.com/"; description = "Simple Linux Utility for Resource Management"; - platforms = platforms.linux; - license = licenses.gpl2Only; - maintainers = with maintainers; [ + platforms = lib.platforms.linux; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ jagajaga markuskowa ]; }; -} +})