From c768093d0e8990657a42b1668c5f86048cbc6675 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Mon, 22 Oct 2018 11:47:38 +1100 Subject: name qsub with name of derivation: fixes #7 --- lib/qsub.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/qsub.nix b/lib/qsub.nix index 528773e..f0b0660 100644 --- a/lib/qsub.nix +++ b/lib/qsub.nix @@ -1,6 +1,6 @@ {stdenv, lib, writeScript}: -{ ppn ? 1, mem ? 1, walltime ? "24:00:00", tmpDir ? "/tmp" }: drv: lib.overrideDerivation drv ({ args, builder, ... }: { +{ ppn ? 1, mem ? 1, walltime ? "24:00:00", tmpDir ? "/tmp" }: drv: lib.overrideDerivation drv ({ args, builder, name, ... }: { builder = "/bin/bash"; args = let script = writeScript "qsub-script" '' @@ -25,7 +25,7 @@ PATH=/usr/bin:/bin:/usr/sbin:/sbin SHELL=/bin/sh NIX_BUILD_CORES=${toString ppn} - id=$(qsub -l nodes=1:ppn=${toString ppn},mem=${toString mem}gb,walltime=${walltime} ${script}) + id=$(qsub -l nodes=1:ppn=${toString ppn},mem=${toString mem}gb,walltime=${walltime} -N "${name}" ${script}) function cleanup { qstat ''${id%%.} 2> /dev/null > /dev/null && qdel $id || true -- cgit v1.2.3