1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-12 19:05:08 +02:00

nix-channel improvements

"nix-channel --add" now accepts a second argument: the channel name.
This allows channels to have a nicer name than (say) nixpkgs_unstable.
If no name is given, it defaults to the last component of the URL
(with "-unstable" or "-stable" removed).

Also, channels are now stored in a profile
(/nix/var/nix/profiles/per-user/$USER/channels).  One advantage of
this is that it allows rollbacks (e.g. if "nix-channel --update" gives
an undesirable update).
This commit is contained in:
Eelco Dolstra 2012-04-14 18:38:52 +02:00
parent 969a14599d
commit e855c7e2c9
6 changed files with 104 additions and 120 deletions

View file

@ -9,9 +9,9 @@ rm -f $TEST_ROOT/.nix-channels
export HOME=$TEST_ROOT
# Test add/list/remove.
nix-channel --add http://foo/bar
nix-channel --add http://foo/bar xyzzy
nix-channel --list | grep -q http://foo/bar
nix-channel --remove http://foo/bar
nix-channel --remove xyzzy
[ -e $TEST_ROOT/.nix-channels ]
[ "$(cat $TEST_ROOT/.nix-channels)" = '' ]