forked from lix-project/lix
parent
5160ceef30
commit
bccff827dc
2 changed files with 18 additions and 2 deletions
|
@ -463,13 +463,15 @@ static const DrvHashModulo & pathDerivationModulo(Store & store, const StorePath
|
||||||
{
|
{
|
||||||
auto h = drvHashes.find(drvPath);
|
auto h = drvHashes.find(drvPath);
|
||||||
if (h == drvHashes.end()) {
|
if (h == drvHashes.end()) {
|
||||||
assert(store.isValidPath(drvPath));
|
|
||||||
// Cache it
|
// Cache it
|
||||||
h = drvHashes.insert_or_assign(
|
h = drvHashes.insert_or_assign(
|
||||||
drvPath,
|
drvPath,
|
||||||
hashDerivationModulo(
|
hashDerivationModulo(
|
||||||
store,
|
store,
|
||||||
store.readDerivation(drvPath),
|
parseDerivation(
|
||||||
|
store,
|
||||||
|
readFile(store.toRealPath(drvPath)),
|
||||||
|
Derivation::nameFromPath(drvPath)),
|
||||||
false)).first;
|
false)).first;
|
||||||
}
|
}
|
||||||
return h->second;
|
return h->second;
|
||||||
|
|
|
@ -7,6 +7,20 @@ nix --store ssh-ng://localhost?remote-store=$TEST_ROOT/other-store doctor
|
||||||
|
|
||||||
startDaemon
|
startDaemon
|
||||||
|
|
||||||
|
# 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 ]]
|
||||||
|
|
||||||
storeCleared=1 NIX_REMOTE_=$NIX_REMOTE $SHELL ./user-envs.sh
|
storeCleared=1 NIX_REMOTE_=$NIX_REMOTE $SHELL ./user-envs.sh
|
||||||
|
|
||||||
nix-store --dump-db > $TEST_ROOT/d1
|
nix-store --dump-db > $TEST_ROOT/d1
|
||||||
|
|
Loading…
Reference in a new issue