Merge pull request #146712 from felixsinger/pkgs/coreboot-toolchain/add-archs

coreboot-toolchain: Add other target architectures
This commit is contained in:
maralorn
2021-11-20 03:00:46 +01:00
committed by GitHub
2 changed files with 55 additions and 45 deletions
@@ -12,51 +12,61 @@
, zlib
}:
stdenvNoCC.mkDerivation rec {
pname = "coreboot-toolchain";
version = "4.15";
let
common = arch: stdenvNoCC.mkDerivation rec {
pname = "coreboot-toolchain-${arch}";
version = "4.15";
src = fetchgit {
url = "https://review.coreboot.org/coreboot";
rev = version;
sha256 = "1qsb2ca22h5f0iwc254qsfm7qcn8967ir8aybdxa1pakgmnfsyp9";
fetchSubmodules = false;
leaveDotGit = true;
postFetch = ''
patchShebangs $out/util/crossgcc/buildgcc
PATH=${lib.makeBinPath [ getopt ]}:$PATH $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
rm -rf $out/.git
src = fetchgit {
url = "https://review.coreboot.org/coreboot";
rev = version;
sha256 = "1qsb2ca22h5f0iwc254qsfm7qcn8967ir8aybdxa1pakgmnfsyp9";
fetchSubmodules = false;
leaveDotGit = true;
postFetch = ''
patchShebangs $out/util/crossgcc/buildgcc
PATH=${lib.makeBinPath [ getopt ]}:$PATH $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
rm -rf $out/.git
'';
};
nativeBuildInputs = [ bison curl git perl ];
buildInputs = [ flex gnat11 zlib ];
enableParallelBuilding = true;
dontConfigure = true;
dontInstall = true;
postPatch = ''
mkdir -p util/crossgcc/tarballs
${lib.concatMapStringsSep "\n" (
file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}"
) (callPackage ./stable.nix { })
}
patchShebangs util/genbuild_h/genbuild_h.sh
'';
buildPhase = ''
export CROSSGCC_VERSION=$(cat .crossgcc_version)
make crossgcc-${arch} CPUS=$NIX_BUILD_CORES DEST=$out
'';
meta = with lib; {
homepage = "https://www.coreboot.org";
description = "coreboot toolchain for ${arch} targets";
license = with licenses; [ bsd2 bsd3 gpl2 lgpl2Plus gpl3Plus ];
maintainers = with maintainers; [ felixsinger ];
platforms = platforms.linux;
};
};
nativeBuildInputs = [ bison curl git perl ];
buildInputs = [ flex gnat11 zlib ];
enableParallelBuilding = true;
dontConfigure = true;
dontInstall = true;
postPatch = ''
mkdir -p util/crossgcc/tarballs
${lib.concatMapStringsSep "\n" (
file: "ln -s ${file.archive} util/crossgcc/tarballs/${file.name}"
) (callPackage ./stable.nix { })
}
patchShebangs util/genbuild_h/genbuild_h.sh
'';
buildPhase = ''
export CROSSGCC_VERSION=$(cat .crossgcc_version)
make crossgcc-i386 CPUS=$NIX_BUILD_CORES DEST=$out
'';
meta = with lib; {
homepage = "https://www.coreboot.org";
description = "coreboot toolchain";
license = with licenses; [ bsd2 bsd3 gpl2 lgpl2Plus gpl3Plus ];
maintainers = with maintainers; [ felixsinger ];
platforms = platforms.linux;
};
in {
i386 = common "i386";
x86_64 = common "x64";
arm = common "arm";
aarch64 = common "aarch64";
riscv = common "riscv";
ppc64 = common "ppc64";
nds32le = common "nds32le";
}
+1 -1
View File
@@ -12068,7 +12068,7 @@ with pkgs;
pscid = nodePackages.pscid;
coreboot-toolchain = callPackage ../development/tools/misc/coreboot-toolchain { };
coreboot-toolchain = callPackages ../development/tools/misc/coreboot-toolchain { };
remarkable-toolchain = callPackage ../development/tools/misc/remarkable/remarkable-toolchain { };