{ lib , nixpkgsOnBuildForBuild }: let version = "4.14"; in lib.mapAttrs (k: v: lib.makeOverridable (v.override { withAda = false; }).overrideAttrs (a: { src = nixpkgsOnBuildForBuild.fetchgit { name = "coreboot-toolchain-source-${version}"; # fetchgit does not understand "pname" url = "https://review.coreboot.org/coreboot"; rev = version; sha256 = { "4.16" = "sha256-PCum+IvJ136eZQLovUi9u4xTLLs17MkMP5Oc0/2mMY4="; "4.14" = "sha256-Cl9jSr1h/6JRcPpkVqbCtevameRe0DIbQfrW+eUyxBs="; }.${version}; fetchSubmodules = false; leaveDotGit = lib.versionAtLeast version "4.15"; postFetch = lib.optionalString (lib.versionAtLeast version "4.15") '' PATH=${lib.makeBinPath [ nixpkgsOnBuildForBuild.getopt ]}:$PATH ${nixpkgsOnBuildForBuild.stdenv.shell} $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version rm -rf $out/.git ''; allowedRequisites = [ ]; }; postPatch = '' patchShebangs util/crossgcc/buildgcc mkdir -p util/crossgcc/tarballs ${lib.concatMapStringsSep "\n" ( file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}" ) (nixpkgsOnBuildForBuild.callPackage ./stable-${version}.nix { }) } patchShebangs util/genbuild_h/genbuild_h.sh ''; }) ) nixpkgsOnBuildForBuild.coreboot-toolchain