Merge pull request #255 from nix-community/better-errors

Better errors
This commit is contained in:
Jörg Thalheim 2023-10-07 22:56:55 +02:00 committed by GitHub
commit 26af7cabdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -201,11 +201,6 @@ struct Drv {
std::optional<nlohmann::json> meta;
Drv(EvalState &state, DrvInfo &drvInfo) {
name = drvInfo.queryName();
system = drvInfo.querySystem();
if (system == "unknown")
throw EvalError("derivation '" + name +
"' must have a 'system' attribute");
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>();
@ -248,6 +243,8 @@ struct Drv {
for (auto &input : drv.inputDrvs) {
inputDrvs[localStore->printStorePath(input.first)] = input.second;
}
name = drvInfo.queryName();
system = drv.platform;
}
};