diff options
-rw-r--r-- | default.nix | 2 | ||||
-rw-r--r-- | lib/qsub.nix | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/default.nix b/default.nix index edb9377..c951ac9 100644 --- a/default.nix +++ b/default.nix @@ -43,7 +43,7 @@ let exec = f: x: y: slurm (builtins.intersectAttrs slurmDefs x) (f (builtins.removeAttrs x (builtins.attrNames slurmDefs)) y); }); qsub = attrs: bionix.extend (self: super: with self; rec { - qsubDefs = { ppn = 1; mem = 1; walltime = "24:00:00"; tmpDir = "/tmp"; sleepTime = 60; queue = null; qsubFlags = null; } // attrs; + qsubDefs = { ppn = 1; mem = 1; walltime = "24:00:00"; tmpDir = "/tmp"; sleepTime = 60; queue = null; qsubFlags = null; qsubPath = "/usr/bin"; } // attrs; qsub = attrs: (callPackage ./lib/qsub.nix {}) (qsubDefs // attrs); exec = f: x: y: qsub (builtins.intersectAttrs qsubDefs x) (f (builtins.removeAttrs x (builtins.attrNames qsubDefs)) y); }); diff --git a/lib/qsub.nix b/lib/qsub.nix index 6370a98..f5a00ec 100644 --- a/lib/qsub.nix +++ b/lib/qsub.nix @@ -2,7 +2,7 @@ with lib; -{ ppn, mem, walltime, queue ? null, qsubFlags ? null, tmpDir, sleepTime}: +{ ppn, mem, walltime, queue ? null, qsubFlags ? null, tmpDir, sleepTime, qsubPath ? "/usr/bin" }: drv: let ppnReified = if drv.multicore then ppn else 1; in lib.overrideDerivation drv ({ args, builder, name, ... }: { @@ -27,7 +27,7 @@ drv: qsub = writeScript "qsub" '' #!${stdenv.shell} - PATH=/usr/bin:/bin:/usr/sbin:/sbin + PATH=${qsubPath} SHELL=/bin/sh NIX_BUILD_CORES=${toString ppnReified} |