diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-04-22 15:17:01 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-05-03 13:43:52 +0200 |
commit | 4a79cba5118f29b896f3d50164beacd4901ab01f (patch) | |
tree | 2159770446fb151e12bf82856b6418201ae23bbf /tests/shell-hello.nix | |
parent | 404c222444b4c8c60148ccf890cd41611f26b0a0 (diff) |
Allow selecting derivation outputs using 'installable!outputs'
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
Diffstat (limited to 'tests/shell-hello.nix')
-rw-r--r-- | tests/shell-hello.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/shell-hello.nix b/tests/shell-hello.nix index 77dcbd2a9..3fdd3501d 100644 --- a/tests/shell-hello.nix +++ b/tests/shell-hello.nix @@ -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 ''; }; } |