1 { stdenv, lib, callPackage }:
3 common = arch: callPackage (
20 stdenvNoCC.mkDerivation (finalAttrs: {
21 pname = "coreboot-toolchain-${arch}";
25 url = "https://review.coreboot.org/coreboot";
26 rev = finalAttrs.version;
27 hash = "sha256-fHulr7w5I9LzBwGt/ZVaN7A3XEd7uQ2eJJifxII7rtk=";
28 fetchSubmodules = false;
31 PATH=${lib.makeBinPath [ getopt ]}:$PATH ${stdenv.shell} $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
34 allowedRequisites = [ ];
37 nativeBuildInputs = [ bison curl git perl ];
38 buildInputs = [ flex zlib (if withAda then gnat else gcc) ];
40 enableParallelBuilding = true;
45 patchShebangs util/crossgcc/buildgcc
47 mkdir -p util/crossgcc/tarballs
49 ${lib.concatMapStringsSep "\n" (
50 file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}"
51 ) (callPackage ./stable.nix { })
54 patchShebangs util/genbuild_h/genbuild_h.sh
58 export CROSSGCC_VERSION=$(cat .crossgcc_version)
59 make crossgcc-${arch} CPUS=$NIX_BUILD_CORES DEST=$out
63 homepage = "https://www.coreboot.org";
64 description = "coreboot toolchain for ${arch} targets";
65 license = with licenses; [ bsd2 bsd3 gpl2 lgpl2Plus gpl3Plus ];
66 maintainers = with maintainers; [ felixsinger ];
67 platforms = platforms.linux;
73 lib.listToAttrs (map (arch: lib.nameValuePair arch (common arch { })) [