1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 02:21:16 +02:00

EvalState::realiseContext(): Allow access to the entire closure

Fixes #11030.
This commit is contained in:
Eelco Dolstra 2024-12-13 16:49:48 +01:00
parent 18770c7e18
commit 08361f031d
5 changed files with 44 additions and 10 deletions

View file

@ -6,6 +6,8 @@ TODO_NixOS
clearStoreIfPossible
export NIX_PATH=config="${config_nix}"
if nix-instantiate --readonly-mode ./import-from-derivation.nix -A result; then
echo "read-only evaluation of an imported derivation unexpectedly failed"
exit 1
@ -15,6 +17,9 @@ outPath=$(nix-build ./import-from-derivation.nix -A result --no-out-link)
[ "$(cat "$outPath")" = FOO579 ]
# Check that we can have access to the entire closure of a derivation output.
nix build --no-link --restrict-eval -I src=. -f ./import-from-derivation.nix importAddPathExpr -v
# FIXME: the next tests are broken on CA.
if [[ -n "${NIX_TESTS_CA_BY_DEFAULT:-}" ]]; then
exit 0