Archived
1
0
forked from rarias/bscpkgs

Simplify paths

This commit is contained in:
2020-09-21 14:34:08 +02:00
parent dba1cc22bc
commit 126f05e92c
26 changed files with 392 additions and 95 deletions

29
garlic/nbody/argv.nix Normal file
View File

@@ -0,0 +1,29 @@
{
stdenv
, particles
, timestamps
, program
, config
}:
stdenv.mkDerivation {
inherit program;
passthru = {
inherit config;
};
name = "${program.name}-argv";
preferLocalBuild = true;
phases = [ "installPhase" ];
dontPatchShebangs = true;
installPhase = ''
mkdir -p $out/bin
cat > $out/bin/run <<EOF
#!/bin/sh
exec ${program}/bin/run -p ${toString config.particles} -t ${toString config.timesteps}
EOF
chmod +x $out/bin/run
'';
}