mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 11:36:03 +01:00
Allow access to the result of fetchClosure
This commit is contained in:
parent
324bfd82dc
commit
7308fde0bc
3 changed files with 16 additions and 0 deletions
|
|
@ -17,4 +17,6 @@ ln -s "$out" "$out"/self
|
|||
echo program > "$out"/program
|
||||
chmod +x "$out"/program
|
||||
|
||||
echo '1 + 2' > "$out"/foo.nix
|
||||
|
||||
echo FOO
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@ clearStore
|
|||
|
||||
[ -e "$caPath" ]
|
||||
|
||||
# Test import-from-derivation on the result of fetchClosure.
|
||||
[[ $(nix eval -v --expr "
|
||||
import \"\${builtins.fetchClosure {
|
||||
fromStore = \"file://$cacheDir\";
|
||||
fromPath = $caPath;
|
||||
}}/foo.nix\"
|
||||
") = 3 ]]
|
||||
|
||||
# Check that URL query parameters aren't allowed.
|
||||
clearStore
|
||||
narCache=$TEST_ROOT/nar-cache
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue