mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
nix profile: Support overriding outputs
This commit is contained in:
parent
4a79cba511
commit
a3c6c5b1c7
7 changed files with 101 additions and 19 deletions
|
@ -101,3 +101,22 @@ printf Utrecht > $flake1Dir/who
|
|||
nix profile install $flake1Dir
|
||||
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello Utrecht" ]]
|
||||
[[ $(nix path-info --json $(realpath $TEST_HOME/.nix-profile/bin/hello) | jq -r .[].ca) =~ fixed:r:sha256: ]]
|
||||
|
||||
# Override the outputs.
|
||||
nix profile remove 0 1
|
||||
nix profile install "$flake1Dir^*"
|
||||
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello Utrecht" ]]
|
||||
[ -e $TEST_HOME/.nix-profile/share/man ]
|
||||
[ -e $TEST_HOME/.nix-profile/include ]
|
||||
|
||||
printf Nix > $flake1Dir/who
|
||||
nix profile upgrade 0
|
||||
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello Nix" ]]
|
||||
[ -e $TEST_HOME/.nix-profile/share/man ]
|
||||
[ -e $TEST_HOME/.nix-profile/include ]
|
||||
|
||||
nix profile remove 0
|
||||
nix profile install "$flake1Dir^man"
|
||||
(! [ -e $TEST_HOME/.nix-profile/bin/hello ])
|
||||
[ -e $TEST_HOME/.nix-profile/share/man ]
|
||||
(! [ -e $TEST_HOME/.nix-profile/include ])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue