1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

ExternalDerivationBuilder: Pass the (scratch) outputs

This commit is contained in:
Eelco Dolstra 2025-10-06 11:33:29 +02:00
parent 6c0d67769d
commit 68bd2e40f4
2 changed files with 12 additions and 2 deletions

View file

@ -1403,13 +1403,17 @@ public:
"HOME": "/homeless-shelter",
"builder": "/nix/store/s1qkj0ph…-bash-5.2p37/bin/bash",
"nativeBuildInputs": "/nix/store/l31j72f1…-version-check-hook",
"out": "/nix/store/2yx2prgx…-hello-2.12.2"
},
"inputPaths": [
"/nix/store/14dciax3mm8j70hjy4c0d68mds9ppx2s-glibc-2.32-54-dev",
"/nix/store/1azs5s8zc0z7m6sssvq1np0m7z873zml-gettext-0.21",
"/nix/store/14dciax3-glibc-2.32-54-dev",
"/nix/store/1azs5s8z-gettext-0.21",
],
"outputs": {
"out": "/nix/store/2yx2prgx…-hello-2.12.2"
},
"realStoreDir": "/nix/store",
"storeDir": "/nix/store",
"system": "aarch64-linux",

View file

@ -74,6 +74,12 @@ struct ExternalDerivationBuilder : DerivationBuilderImpl
l.push_back(store.printStorePath(i));
json.emplace("inputPaths", std::move(l));
}
{
auto l = nlohmann::json::object();
for (auto & i : scratchOutputs)
l.emplace(i.first, store.printStorePath(i.second));
json.emplace("outputs", std::move(l));
}
// TODO(cole-h): writing this to stdin is too much effort right now, if we want to revisit
// that, see this comment by Eelco about how to make it not suck: