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.
This commit is contained in:
Chris Hodapp
2025-12-07 01:26:36 -08:00
parent 94748c6d9d
commit 8b77e203bf
@@ -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