From 8a84bd8c8bda1e4c6764c10ecdef9d74e4884800 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Mon, 20 Apr 2015 00:34:29 -0400 Subject: Support tarballs in nix channel URLs --- tests/nix-channel.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests') diff --git a/tests/nix-channel.sh b/tests/nix-channel.sh index a25d56bec11e..0114566d784c 100644 --- a/tests/nix-channel.sh +++ b/tests/nix-channel.sh @@ -41,3 +41,26 @@ grep -q 'item.*attrPath="foo".*name="dependencies"' $TEST_ROOT/meta.xml # Do an install. nix-env -i dependencies [ -e $TEST_ROOT/var/nix/profiles/default/foobar ] + + + +clearProfiles +clearManifests +rm -f $TEST_ROOT/.nix-channels + +# Test updating from a tarball +nix-channel --add file://$TEST_ROOT/foo/nixexprs.tar.bz2 +nix-channel --update + +# Do a query. +nix-env -qa \* --meta --xml --out-path > $TEST_ROOT/meta.xml +if [ "$xmllint" != false ]; then + $xmllint --noout $TEST_ROOT/meta.xml || fail "malformed XML" +fi +grep -q 'meta.*description.*Random test package' $TEST_ROOT/meta.xml +grep -q 'item.*attrPath="foo".*name="dependencies"' $TEST_ROOT/meta.xml + +# Do an install. +nix-env -i dependencies +[ -e $TEST_ROOT/var/nix/profiles/default/foobar ] + -- cgit 1.4.1