Skip to content

Commit

Permalink
Merge pull request #12351 from DeterminateSystems/test-12339
Browse files Browse the repository at this point in the history
Add a test for #12339
  • Loading branch information
edolstra authored Jan 24, 2025
2 parents c527fe0 + d48d464 commit 99dbcca
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/functional/nix-channel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,14 @@ nix-env -i dependencies-top
[ -e $TEST_HOME/.nix-profile/foobar ]

# Test evaluation through a channel symlink (#9882).
nix-instantiate '<foo/dependencies.nix>'
drvPath=$(nix-instantiate '<foo/dependencies.nix>')

# Add a test for the special case behaviour of 'nixpkgs' in the
# channels for root (see EvalSettings::getDefaultNixPath()).
if ! isTestOnNixOS; then
nix-channel --add file://$TEST_ROOT/foo nixpkgs
nix-channel --update
mv $TEST_HOME/.local/state/nix/profiles $TEST_ROOT/var/nix/profiles/per-user/root
drvPath2=$(nix-instantiate '<nixpkgs>')
[[ "$drvPath" = "$drvPath2" ]]
fi

0 comments on commit 99dbcca

Please sign in to comment.