mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
4a79cba511
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
26 lines
522 B
Nix
26 lines
522 B
Nix
with import ./config.nix;
|
|
|
|
{
|
|
hello = mkDerivation {
|
|
name = "hello";
|
|
outputs = [ "out" "dev" ];
|
|
meta.outputsToInstall = [ "out" ];
|
|
buildCommand =
|
|
''
|
|
mkdir -p $out/bin $dev/bin
|
|
|
|
cat > $out/bin/hello <<EOF
|
|
#! ${shell}
|
|
who=\$1
|
|
echo "Hello \''${who:-World} from $out/bin/hello"
|
|
EOF
|
|
chmod +x $out/bin/hello
|
|
|
|
cat > $dev/bin/hello2 <<EOF
|
|
#! ${shell}
|
|
echo "Hello2"
|
|
EOF
|
|
chmod +x $dev/bin/hello2
|
|
'';
|
|
};
|
|
}
|