1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 19:23:54 +02:00

Add tests for "nix run"

This commit is contained in:
Eelco Dolstra 2017-11-20 18:36:36 +01:00
parent f5f29dc2b7
commit 4cde04f476
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 46 additions and 1 deletions

17
tests/run.nix Normal file
View file

@ -0,0 +1,17 @@
with import ./config.nix;
{
hello = mkDerivation {
name = "hello";
buildCommand =
''
mkdir -p $out/bin
cat > $out/bin/hello <<EOF
#! ${shell}
who=\$1
echo "Hello \''${who:-World} from $out/bin/hello"
EOF
chmod +x $out/bin/hello
'';
};
}