aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-06-14 09:48:34 +1000
committerJustin Bedo <cu@cua0.org>2019-06-14 09:48:34 +1000
commit27d69830a9475253c239ada6c161a938c52c01f8 (patch)
treeea217740e0f783f5fc3324d1f267b983408f5150
parentf8f2c0904038d501d28390242445281d45e023ce (diff)
slurm,qsub: update to allow chaining of execution engines
Previously exec was redefined to defer to slurm/pbs for execution. This did not chain the previous exec, meaning you couldn't chain execs.
-rw-r--r--default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/default.nix b/default.nix
index c951ac9..a0ecce0 100644
--- a/default.nix
+++ b/default.nix
@@ -40,12 +40,12 @@ let
slurm = attrs: bionix.extend (self: super: with self; rec {
slurmDefs = { ppn = 1; mem = 1; walltime = "24:00:00"; partition = null; slurmFlags = null; salloc = "/usr/bin/salloc"; } // attrs;
slurm = attrs: (callPackage ./lib/slurm.nix {}) (slurmDefs // attrs);
- exec = f: x: y: slurm (builtins.intersectAttrs slurmDefs x) (f (builtins.removeAttrs x (builtins.attrNames slurmDefs)) y);
+ exec = f: x: y: slurm (builtins.intersectAttrs slurmDefs x) (super.exec 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; 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);
+ exec = f: x: y: qsub (builtins.intersectAttrs qsubDefs x) (super.exec (builtins.removeAttrs x (builtins.attrNames qsubDefs)) y);
});
def = f: defs: attrs: f (defs // attrs);
pipe = let g = fs: with builtins; let h = head fs; t = tail fs; in if t != [] then x: (g t (h x)) else h; in g;