From fa35a2634108bd179de0c7dd21ca5355f6918a9b Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Thu, 16 May 2019 21:17:57 +1000 Subject: sbatch: allow path specification for salloc --- lib/sbatch.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sbatch.nix b/lib/sbatch.nix index efb7654..d52c23e 100644 --- a/lib/sbatch.nix +++ b/lib/sbatch.nix @@ -2,7 +2,7 @@ with lib; -{ ppn, mem, walltime, partition ? null, slurmFlags ? null}: +{ ppn, mem, walltime, partition ? null, slurmFlags ? null, salloc ? "/usr/bin/salloc" }: drv: let ppnReified = if drv.multicore then ppn else 1; in lib.overrideDerivation drv ({ args, builder, name, ... }: { @@ -17,7 +17,7 @@ drv: #!${stdenv.shell} NIX_BUILD_CORES=${toString ppnReified} - salloc -c $NIX_BUILD_CORES --mem=${toString mem}G -t ${walltime} \ + ${salloc} -c $NIX_BUILD_CORES --mem=${toString mem}G -t ${walltime} \ -J "${name}" \ ${optionalString (partition != null) "-p ${partition}"} \ ${optionalString (slurmFlags != null) slurmFlags} \ -- cgit v1.2.3