Commit 8b77e203 authored by Chris Hodapp's avatar Chris Hodapp
Browse files

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.
parent 94748c6d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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