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

(cherry picked from commit 9cb287657bec5a969d8bb1678d598d9fa820e60b)
This commit is contained in:
Shea Levy 2023-12-23 17:15:09 -05:00
parent d40e91440d
commit be208d8e78
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
2 changed files with 11 additions and 12 deletions

10
tests/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