1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

Merge pull request #5047 from symphorien/fix-nix-channel

nix-channel: use nix-env -i --remove-all to upgrade
This commit is contained in:
Théophane Hufschmitt 2021-12-17 10:05:48 +01:00 committed by GitHub
commit 23ea1e46cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 29 deletions

View file

@ -35,16 +35,14 @@ grep -q 'item.*attrPath="foo".*name="dependencies-top"' $TEST_ROOT/meta.xml
nix-env -i dependencies-top
[ -e $TEST_HOME/.nix-profile/foobar ]
clearProfiles
rm -f $TEST_HOME/.nix-channels
# Test updating from a tarball
nix-channel --add file://$TEST_ROOT/foo/nixexprs.tar.bz2 foo
nix-channel --add file://$TEST_ROOT/foo/nixexprs.tar.bz2 bar
nix-channel --update
# Do a query.
nix-env -qa \* --meta --xml --out-path > $TEST_ROOT/meta.xml
grep -q 'meta.*description.*Random test package' $TEST_ROOT/meta.xml
grep -q 'item.*attrPath="bar".*name="dependencies-top"' $TEST_ROOT/meta.xml
grep -q 'item.*attrPath="foo".*name="dependencies-top"' $TEST_ROOT/meta.xml
# Do an install.