aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix8
-rw-r--r--lib/slurm.nix (renamed from lib/sbatch.nix)6
2 files changed, 7 insertions, 7 deletions
diff --git a/default.nix b/default.nix
index 575d176..15b8d87 100644
--- a/default.nix
+++ b/default.nix
@@ -36,10 +36,10 @@ let
ascat = callBionix ./tools/ascat.nix {};
fastp = callBionix ./tools/fastp.nix {};
- sbatch = attrs: bionix.extend (self: super: with self; rec {
- sbatchDefs = { ppn = 1; mem = 1; walltime = "24:00:00"; partition = null; slurmFlags = null; } // attrs;
- sbatch = attrs: (callPackage ./lib/sbatch.nix {}) (sbatchDefs // attrs);
- exec = f: x: y: sbatch (builtins.intersectAttrs sbatchDefs x) (f (builtins.removeAttrs x (builtins.attrNames sbatchDefs)) y);
+ slurm = attrs: bionix.extend (self: super: with self; rec {
+ slurmDefs = { ppn = 1; mem = 1; walltime = "24:00:00"; partition = null; slurmFlags = null; } // 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);
});
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;
diff --git a/lib/sbatch.nix b/lib/slurm.nix
index d52c23e..daca4af 100644
--- a/lib/sbatch.nix
+++ b/lib/slurm.nix
@@ -8,12 +8,12 @@ drv:
in lib.overrideDerivation drv ({ args, builder, name, ... }: {
builder = stdenv.shell;
args = let
- script = writeScript "sbatch-script" ''
+ script = writeScript "slurm-script" ''
#!${stdenv.shell}
${builder} ${lib.escapeShellArgs args}
'';
- sbatch = writeScript "sbatch" ''
+ slurm = writeScript "slurm" ''
#!${stdenv.shell}
NIX_BUILD_CORES=${toString ppnReified}
@@ -24,5 +24,5 @@ drv:
${script}
'';
- in [ "-c" sbatch ];
+ in [ "-c" slurm ];
})