From 56f0464288aa390a8b0c57e35a282709fee409fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 12 Sep 2023 09:01:51 +0200 Subject: [PATCH] use platform instead of querySystem() nix-build uses "system" from the derivation rather than the derivation attributes --- src/nix-eval-jobs.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 8acdc64..39f410c 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -201,11 +201,6 @@ struct Drv { std::optional 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(); @@ -248,6 +243,8 @@ struct Drv { for (auto &input : drv.inputDrvs) { inputDrvs[localStore->printStorePath(input.first)] = input.second; } + name = drvInfo.queryName(); + system = drv.platform; } };