forked from lix-project/hydra
Merge pull request #1195 from NixOS/update-nix
Update to Nix 2.8.0pre20220404_e496241
This commit is contained in:
commit
8cbf065468
18
flake.lock
18
flake.lock
|
@ -23,27 +23,25 @@
|
||||||
"nixpkgs-regression": "nixpkgs-regression"
|
"nixpkgs-regression": "nixpkgs-regression"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1646680282,
|
"lastModified": 1649172203,
|
||||||
"narHash": "sha256-m8tqCS6uHveDon5GSro5yZor9H+sHeh+v/veF1IGw24=",
|
"narHash": "sha256-Q3nYaXqbseDOvZrlePKeIrx0/KzqyrtNpxHIUbtFHuI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "ffe155abd36366a870482625543f9bf924a58281",
|
"rev": "5fe4fe823c193cbb7bfa05a468de91eeab09058d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"id": "nix",
|
||||||
"ref": "2.7.0",
|
"type": "indirect"
|
||||||
"repo": "nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1632864508,
|
"lastModified": 1645296114,
|
||||||
"narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=",
|
"narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "82891b5e2c2359d7e58d08849e4c89511ab94234",
|
"rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
description = "A Nix-based continuous build system";
|
description = "A Nix-based continuous build system";
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nix/nixpkgs";
|
inputs.nixpkgs.follows = "nix/nixpkgs";
|
||||||
inputs.nix.url = github:NixOS/nix/2.7.0;
|
#inputs.nix.url = github:NixOS/nix/2.7.0;
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nix }:
|
outputs = { self, nixpkgs, nix }:
|
||||||
let
|
let
|
||||||
|
|
|
@ -210,7 +210,9 @@ static void worker(
|
||||||
|
|
||||||
nlohmann::json out;
|
nlohmann::json out;
|
||||||
for (auto & j : outputs)
|
for (auto & j : outputs)
|
||||||
out[j.first] = state.store->printStorePath(j.second);
|
// FIXME: handle CA/impure builds.
|
||||||
|
if (j.second)
|
||||||
|
out[j.first] = state.store->printStorePath(*j.second);
|
||||||
job["outputs"] = std::move(out);
|
job["outputs"] = std::move(out);
|
||||||
|
|
||||||
reply["job"] = std::move(job);
|
reply["job"] = std::move(job);
|
||||||
|
@ -489,10 +491,14 @@ int main(int argc, char * * argv)
|
||||||
std::string drvName(drvPath.name());
|
std::string drvName(drvPath.name());
|
||||||
assert(hasSuffix(drvName, drvExtension));
|
assert(hasSuffix(drvName, drvExtension));
|
||||||
drvName.resize(drvName.size() - drvExtension.size());
|
drvName.resize(drvName.size() - drvExtension.size());
|
||||||
auto h = std::get<Hash>(hashDerivationModulo(*store, drv, true));
|
|
||||||
auto outPath = store->makeOutputPath("out", h, drvName);
|
auto hashModulo = hashDerivationModulo(*store, drv, true);
|
||||||
|
if (hashModulo.kind != DrvHash::Kind::Regular) continue;
|
||||||
|
auto h = hashModulo.hashes.find("out");
|
||||||
|
if (h == hashModulo.hashes.end()) continue;
|
||||||
|
auto outPath = store->makeOutputPath("out", h->second, drvName);
|
||||||
drv.env["out"] = store->printStorePath(outPath);
|
drv.env["out"] = store->printStorePath(outPath);
|
||||||
drv.outputs.insert_or_assign("out", DerivationOutput { .output = DerivationOutputInputAddressed { .path = outPath } });
|
drv.outputs.insert_or_assign("out", DerivationOutput::InputAddressed { .path = outPath });
|
||||||
auto newDrvPath = store->printStorePath(writeDerivation(*store, drv));
|
auto newDrvPath = store->printStorePath(writeDerivation(*store, drv));
|
||||||
|
|
||||||
debug("rewrote aggregate derivation %s -> %s", store->printStorePath(drvPath), newDrvPath);
|
debug("rewrote aggregate derivation %s -> %s", store->printStorePath(drvPath), newDrvPath);
|
||||||
|
|
Loading…
Reference in a new issue