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:
parent
f5f29dc2b7
commit
4cde04f476
3 changed files with 46 additions and 1 deletions
17
tests/run.nix
Normal file
17
tests/run.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue