aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-06-23 10:04:35 +0200
committerGitHub <noreply@github.com>2021-06-23 10:04:35 +0200
commit3e4126b67caf6ae14cf09f78bcbf93f83d685d7f (patch)
treecf1ad52492dcd25bc8f2f1494fa29c244d9f51c2
parent4f9508c3b5a5e6ecfff8a9f44b24d170bc0ebf0e (diff)
parent498677cbedf9c7dee1df86e775342cdf93a110bd (diff)
Merge pull request #4926 from NixOS/ca/build-remote-signal-6
Fix the remote build of CA derivations
-rw-r--r--src/build-remote/build-remote.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index 57f2cd32d..0904f2ce9 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -277,7 +277,16 @@ connected:
auto drv = store->readDerivation(*drvPath);
auto outputHashes = staticOutputHashes(*store, drv);
- drv.inputSrcs = store->parseStorePathSet(inputs);
+
+ // Hijack the inputs paths of the derivation to include all the paths
+ // that come from the `inputDrvs` set.
+ // We don’t do that for the derivations whose `inputDrvs` is empty
+ // because
+ // 1. It’s not needed
+ // 2. Changing the `inputSrcs` set changes the associated output ids,
+ // which break CA derivations
+ if (!drv.inputDrvs.empty())
+ drv.inputSrcs = store->parseStorePathSet(inputs);
auto result = sshStore->buildDerivation(*drvPath, drv);