ci/eval: add extraNixpkgsConfig argument (#457204)

This commit is contained in:
Gaétan Lepage
2025-10-31 23:44:10 +00:00
committed by GitHub
4 changed files with 13 additions and 1 deletions

View File

@@ -18,6 +18,7 @@
lib ? import (path + "/lib"),
trace ? false,
path ? ./../..,
extraNixpkgsConfigJson ? "{}",
}:
let
@@ -46,6 +47,7 @@ let
outpaths = import ./outpaths.nix {
inherit path;
extraNixpkgsConfig = builtins.fromJSON extraNixpkgsConfigJson;
attrNamesOnly = true;
};

View File

@@ -8,6 +8,7 @@
myChunk,
includeBroken,
systems,
extraNixpkgsConfigJson,
}:
let
@@ -17,6 +18,7 @@ let
unfiltered = import ./outpaths.nix {
inherit path;
inherit includeBroken systems;
extraNixpkgsConfig = builtins.fromJSON extraNixpkgsConfigJson;
};
# Turns the unfiltered recursive attribute set into one that is limited to myAttrpaths

View File

@@ -26,6 +26,8 @@
quickTest ? false,
# Don't try to eval packages marked as broken.
includeBroken ? false,
# Customize the config used to evaluate nixpkgs
extraNixpkgsConfig ? { },
}:
let
@@ -75,6 +77,7 @@ let
"$src/ci/eval/attrpaths.nix" \
-A paths \
-I "$src" \
--argstr extraNixpkgsConfigJson ${lib.escapeShellArg (builtins.toJSON extraNixpkgsConfig)} \
--option restrict-eval true \
--option allow-import-from-derivation false \
--option eval-system "${evalSystem}" > $out/paths.json
@@ -120,6 +123,7 @@ let
--arg attrpathFile "${attrpathFile}" \
--arg systems "[ \"$system\" ]" \
--arg includeBroken ${lib.boolToString includeBroken} \
--argstr extraNixpkgsConfigJson ${lib.escapeShellArg (builtins.toJSON extraNixpkgsConfig)} \
-I ${nixpkgs} \
-I ${attrpathFile} \
> "$outputDir/result/$myChunk" \

View File

@@ -11,6 +11,9 @@
# Set this to `null` to build for builtins.currentSystem only
systems ? builtins.fromJSON (builtins.readFile ../supportedSystems.json),
# Customize the config used to evaluate nixpkgs
extraNixpkgsConfig ? { },
}:
let
lib = import (path + "/lib");
@@ -55,7 +58,8 @@ let
true;
inHydra = true;
};
}
// extraNixpkgsConfig;
__allowFileset = false;
};