diff options
author | Justin Bedo <cu@cua0.org> | 2019-05-16 21:17:57 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2019-05-16 21:32:21 +1000 |
commit | fa35a2634108bd179de0c7dd21ca5355f6918a9b (patch) | |
tree | e1981644ba1d8597c660c7a6e13051a270842b91 /lib | |
parent | faa64f72447c26706e2c15c02f70443c7b325091 (diff) |
sbatch: allow path specification for salloc
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbatch.nix | 4 |
1 files changed, 2 insertions, 2 deletions
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} \ |