From 8b77e203bf4f8513e5a09ac9d1ddcdd06968ff24 Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Sun, 7 Dec 2025 01:10:29 -0800 Subject: [PATCH] Add overridable "archives" attribute to coreboot-toolchain For various reasons, the coreboot toolchain is extremely picky about having *exactly* the expected versions of its various dependencies available to it. Because this is the case it is not really functional to leverage the toolchain derivation definition from nixpkgs in an out-of-tree configuration that may wish to build a different version of coreboot (e.g. an older/newer version, or a minor fork as many vendors tend to create). This is because that out-of-tree build would have to override not just the `src` and `version` for coreboot (which, can easily be done), but also the dependency definitions in stable.nix (which is not easy to do). By introducing an indirection through an explicit `archives` attribute, it becomes possible to override stable.nix with an alternate version. --- pkgs/development/tools/misc/coreboot-toolchain/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/coreboot-toolchain/default.nix b/pkgs/development/tools/misc/coreboot-toolchain/default.nix index 501edc0e60fa..dc5469ce8c06 100644 --- a/pkgs/development/tools/misc/coreboot-toolchain/default.nix +++ b/pkgs/development/tools/misc/coreboot-toolchain/default.nix @@ -41,6 +41,8 @@ let allowedRequisites = [ ]; }; + archives = ./stable.nix; + nativeBuildInputs = [ bison curl @@ -63,7 +65,7 @@ let mkdir -p util/crossgcc/tarballs ${lib.concatMapStringsSep "\n" (file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}") ( - callPackage ./stable.nix { } + callPackage finalAttrs.archives { } )} patchShebangs util/genbuild_h/genbuild_h.sh