lix-releng-staging/tests/shell-hello.nix
2020-04-30 08:31:37 -06:00

18 lines
318 B
Nix

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
'';
};
}