remote-store test: Break out IFD expression into a separate file

This commit is contained in:
Shea Levy 2023-12-23 17:15:09 -05:00
parent ee439734e9
commit 9cb287657b
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
2 changed files with 11 additions and 12 deletions

10
tests/functional/ifd.nix Normal file
View File

@ -0,0 +1,10 @@
with import ./config.nix;
import (
mkDerivation {
name = "foo";
bla = import ./dependencies.nix {};
buildCommand = "
echo \\\"hi\\\" > $out
";
}
)

View File

@ -19,18 +19,7 @@ else
fi
# Test import-from-derivation through the daemon.
[[ $(nix eval --impure --raw --expr '
with import ./config.nix;
import (
mkDerivation {
name = "foo";
bla = import ./dependencies.nix {};
buildCommand = "
echo \\\"hi\\\" > $out
";
}
)
') = hi ]]
[[ $(nix eval --impure --raw --file ./ifd.nix) = hi ]]
storeCleared=1 NIX_REMOTE_=$NIX_REMOTE $SHELL ./user-envs.sh