mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
Allow selecting derivation outputs using 'installable!outputs'
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
This commit is contained in:
parent
404c222444
commit
4a79cba511
17 changed files with 255 additions and 12 deletions
|
@ -3,15 +3,24 @@ with import ./config.nix;
|
|||
{
|
||||
hello = mkDerivation {
|
||||
name = "hello";
|
||||
outputs = [ "out" "dev" ];
|
||||
meta.outputsToInstall = [ "out" ];
|
||||
buildCommand =
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue