From f309fef2f30b41c8b220807ea478fef6f09ee8e1 Mon Sep 17 00:00:00 2001 From: Winter Date: Sun, 11 May 2025 17:54:46 -0400 Subject: [PATCH] ci/eval: allow configuration of the system to eval attrpaths on Right now, there are some paths that don't even get exposed to certain systems (notably Darwin, but some outliers exist for Linux such as the Darwin-specific Hackage overlay) for one reason or another, usually because of assertions like `stdenv.isLinux`. To catch these scenarios, this change implements a way to specify the system to evaluate attrpaths on, and makes it default to the system that we're evaluating outpaths for. (cherry picked from commit 6b18b3d67b5358a5b5fe3a8cb50f854645caeaaf) --- ci/eval/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/eval/default.nix b/ci/eval/default.nix index e3f035e18d56..fff771054450 100644 --- a/ci/eval/default.nix +++ b/ci/eval/default.nix @@ -36,6 +36,9 @@ let supportedSystems = builtins.fromJSON (builtins.readFile ../supportedSystems.json); attrpathsSuperset = + { + evalSystem, + }: runCommand "attrpaths-superset.json" { src = nixpkgs; @@ -55,6 +58,7 @@ let -I "$src" \ --option restrict-eval true \ --option allow-import-from-derivation false \ + --option eval-system "${evalSystem}" \ --arg enableWarnings false > $out/paths.json ''; @@ -65,7 +69,7 @@ let # because `--argstr system` would only be passed to the ci/default.nix file! evalSystem, # The path to the `paths.json` file from `attrpathsSuperset` - attrpathFile ? "${attrpathsSuperset}/paths.json", + attrpathFile ? "${attrpathsSuperset { inherit evalSystem; }}/paths.json", # The number of attributes per chunk, see ./README.md for more info. chunkSize, checkMeta ? true,