hashDerivationModulo(): Handle chroot stores

This makes 'nix copy --to /mnt /nix/store/bla.drv' work.
This commit is contained in:
Eelco Dolstra 2018-06-13 18:00:54 +02:00
parent 3c5d9f478d
commit 7902fccf6f
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -342,7 +342,7 @@ Hash hashDerivationModulo(Store & store, Derivation drv)
Hash h = drvHashes[i.first];
if (!h) {
assert(store.isValidPath(i.first));
Derivation drv2 = readDerivation(i.first);
Derivation drv2 = readDerivation(store.toRealPath(i.first));
h = hashDerivationModulo(store, drv2);
drvHashes[i.first] = h;
}