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 bd68277..4f16640 100644 --- a/default.nix +++ b/default.nix @@ -32,7 +32,7 @@ let strelka = callBionix ./tools/strelka.nix {}; qsub = attrs: bionix.extend (self: super: with self; rec { - qsubDefs = { ppn = 1; mem = 1; walltime = "24:00:00"; tmpDir = "/tmp"; sleepTime = 60; queue = null; flags = null; } // attrs; + qsubDefs = { ppn = 1; mem = 1; walltime = "24:00:00"; tmpDir = "/tmp"; sleepTime = 60; queue = null; qsubFlags = null; } // 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 85036fb..235aa80 100644 --- a/lib/qsub.nix +++ b/lib/qsub.nix @@ -2,7 +2,7 @@ with lib; -{ ppn, mem, walltime, queue ? null, flags ? null, tmpDir, sleepTime}: drv: lib.overrideDerivation drv ({ args, builder, name, ... }: { +{ ppn, mem, walltime, queue ? null, qsubFlags ? null, tmpDir, sleepTime}: drv: lib.overrideDerivation drv ({ args, builder, name, ... }: { builder = "/bin/bash"; args = let script = writeScript "qsub-script" '' @@ -32,7 +32,7 @@ with lib; qsub -l nodes=1:ppn=${toString ppn},mem=${toString mem}gb,walltime=${walltime} \ -N "${name}" \ ${optionalString (queue != null) "-q ${queue}"} \ - ${optionalString (flags != null) flags} \ + ${optionalString (qsubFlags != null) qsubFlags} \ ${script} 2>&1 > id if [ $? -eq 0 ] ; then break |