diff options
author | Justin Bedo <cu@cua0.org> | 2019-06-11 18:10:13 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2019-06-11 18:23:29 +1000 |
commit | dc448fa97dfc683ccd491fc4a00e58b6d0f150ef (patch) | |
tree | 88630eeb75e60978c293e7868fdb24a266cafbf9 | |
parent | e82405f0e8e4680aa6a39556810535e5c1d88487 (diff) |
qsub: parameterise the path to PBS utils
-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} |