bscpkgs/bsc/garlic/srun.nix

23 lines
347 B
Nix

{
stdenv
}:
{
program
, nixPrefix ? ""
, srunOptions ? ""
}:
stdenv.mkDerivation rec {
name = "srun";
preferLocalBuild = true;
phases = [ "installPhase" ];
dontPatchShebangs = true;
installPhase = ''
cat > $out <<EOF
#!/bin/sh
exec srun --mpi=pmi2 ${srunOptions} ${nixPrefix}${program}
EOF
chmod +x $out
'';
}