mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Merge 68f3b56b18
into e7078d4de1
This commit is contained in:
commit
df3daa2766
2 changed files with 5 additions and 1 deletions
|
@ -186,6 +186,7 @@ struct ProfileManifest
|
||||||
for (auto & packageInfo : packageInfos) {
|
for (auto & packageInfo : packageInfos) {
|
||||||
ProfileElement element;
|
ProfileElement element;
|
||||||
element.storePaths = {packageInfo.queryOutPath()};
|
element.storePaths = {packageInfo.queryOutPath()};
|
||||||
|
element.priority = packageInfo.queryMetaInt("priority", NixInt{defaultPriority}).value;
|
||||||
addElement(std::move(element));
|
addElement(std::move(element));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,16 +50,19 @@ printf false > $flake1Dir/ca.nix
|
||||||
cp "${config_nix}" $flake1Dir/
|
cp "${config_nix}" $flake1Dir/
|
||||||
|
|
||||||
# Test upgrading from nix-env.
|
# Test upgrading from nix-env.
|
||||||
nix-env -f ./user-envs.nix -i foo-1.0
|
nix-env -f ./user-envs.nix -i foo-1.0 foo-0.1
|
||||||
nix profile list | grep -A2 'Name:.*foo' | grep 'Store paths:.*foo-1.0'
|
nix profile list | grep -A2 'Name:.*foo' | grep 'Store paths:.*foo-1.0'
|
||||||
|
nix profile list | grep -A2 'Name:.*foo' | grep 'Store paths:.*foo-0.1'
|
||||||
nix profile install $flake1Dir -L
|
nix profile install $flake1Dir -L
|
||||||
nix profile list | grep -A4 'Name:.*flake1' | grep 'Locked flake URL:.*narHash'
|
nix profile list | grep -A4 'Name:.*flake1' | grep 'Locked flake URL:.*narHash'
|
||||||
|
grep '"priority":10' $TEST_HOME/.nix-profile/manifest.json
|
||||||
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello World" ]]
|
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello World" ]]
|
||||||
[ -e $TEST_HOME/.nix-profile/share/man ]
|
[ -e $TEST_HOME/.nix-profile/share/man ]
|
||||||
(! [ -e $TEST_HOME/.nix-profile/include ])
|
(! [ -e $TEST_HOME/.nix-profile/include ])
|
||||||
nix profile history
|
nix profile history
|
||||||
nix profile history | grep "packages.$system.default: ∅ -> 1.0"
|
nix profile history | grep "packages.$system.default: ∅ -> 1.0"
|
||||||
nix profile diff-closures | grep 'env-manifest.nix: ε → ∅'
|
nix profile diff-closures | grep 'env-manifest.nix: ε → ∅'
|
||||||
|
nix profile remove --regex ".*foo-0.1" 2>&1 | grep 'removed 1 packages'
|
||||||
|
|
||||||
# Test XDG Base Directories support
|
# Test XDG Base Directories support
|
||||||
export NIX_CONFIG="use-xdg-base-directories = true"
|
export NIX_CONFIG="use-xdg-base-directories = true"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue