forked from rarias/bscpkgs
Add srun wrapper and use pmi2
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
{
|
||||
stdenv
|
||||
, bash
|
||||
}:
|
||||
|
||||
{
|
||||
app
|
||||
, env ? ""
|
||||
, argv # bash array as string, example: argv=''(-f "file with spaces" -t 10)''
|
||||
}:
|
||||
|
||||
@@ -12,11 +14,14 @@ stdenv.mkDerivation {
|
||||
name = "${app.name}-argv";
|
||||
preferLocalBuild = true;
|
||||
phases = [ "installPhase" ];
|
||||
dontPatchShebangs = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/run <<EOF
|
||||
#!/bin/sh
|
||||
#!${bash}/bin/bash
|
||||
# Requires /nix to use bash
|
||||
|
||||
${env}
|
||||
|
||||
argv=${argv}
|
||||
exec ${app}/bin/run \''${argv[@]}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user