From 7902fccf6fa903414703a4eccd2c3514809a0772 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 13 Jun 2018 18:00:54 +0200 Subject: [PATCH] hashDerivationModulo(): Handle chroot stores This makes 'nix copy --to /mnt /nix/store/bla.drv' work. --- src/libstore/derivations.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index 74b861281..1e187ec5e 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -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; }