push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
{
stdenv,
lib,
callPackage,
}:
let
common =
arch:
callPackage (
{
bison,
callPackage,
curl,
fetchgit,
flex,
getopt,
git,
gnat14,
gcc14,
lib,
perl,
stdenvNoCC,
zlib,
withAda ? true,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "coreboot-toolchain-${arch}";
version = "25.03";
src = fetchgit {
url = "https://review.coreboot.org/coreboot";
rev = finalAttrs.version;
hash = "sha256-zyfBQKVton+2vjYd6fqrUqkHY9bci411pujRGabvTjQ=";
fetchSubmodules = false;
leaveDotGit = true;
postFetch = ''
PATH=${lib.makeBinPath [ getopt ]}:$PATH ${stdenv.shell} $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
rm -rf $out/.git
'';
allowedRequisites = [ ];
};
nativeBuildInputs = [
bison
curl
git
perl
];
buildInputs = [
flex
zlib
(if withAda then gnat14 else gcc14)
];
enableParallelBuilding = true;
dontConfigure = true;
dontInstall = true;
postPatch = ''
patchShebangs util/crossgcc/buildgcc
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
jmbaur
];
platforms = platforms.linux;
};
})
);
in
lib.listToAttrs (
map (arch: lib.nameValuePair arch (common arch { })) [
"i386"
"x64"
"arm"
"aarch64"
"riscv"
"ppc64"
]
)

View File

@@ -0,0 +1,52 @@
{ fetchurl }:
[
{
name = "gmp-6.3.0.tar.xz";
archive = fetchurl {
sha256 = "1648ad1mr7c1r8lkkqshrv1jfjgfdb30plsadxhni7mq041bihm3";
url = "mirror://gnu/gmp/gmp-6.3.0.tar.xz";
};
}
{
name = "mpfr-4.2.1.tar.xz";
archive = fetchurl {
sha256 = "1cnb3y7y351qg6r7ynwsgaykm7l2a8zg2nlljs4rf9k778shfy17";
url = "mirror://gnu/mpfr/mpfr-4.2.1.tar.xz";
};
}
{
name = "mpc-1.3.1.tar.gz";
archive = fetchurl {
sha256 = "1f2rqz0hdrrhx4y1i5f8pv6yv08a876k1dqcm9s2p26gyn928r5b";
url = "mirror://gnu/mpc/mpc-1.3.1.tar.gz";
};
}
{
name = "gcc-14.2.0.tar.xz";
archive = fetchurl {
sha256 = "1j9wdznsp772q15w1kl5ip0gf0bh8wkanq2sdj12b7mzkk39pcx7";
url = "mirror://gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz";
};
}
{
name = "binutils-2.43.1.tar.xz";
archive = fetchurl {
sha256 = "1z9d2f0894xvjlfnvni4wbxnqgqd42j9x8wpnwc13if4lc145xqk";
url = "mirror://gnu/binutils/binutils-2.43.1.tar.xz";
};
}
{
name = "acpica-unix-20241212.tar.gz";
archive = fetchurl {
sha256 = "0q8rqc9nxvyg4310rc93az04j01p91q7ipzvhl2722rrxv7q7jlx";
url = "https://github.com/acpica/acpica/releases/download/R2024_12_12/acpica-unix-20241212.tar.gz";
};
}
{
name = "nasm-2.16.03.tar.bz2";
archive = fetchurl {
sha256 = "0mwynbnn7c4ay4rpcsyp99j49sa6j3p8gk5pigwssqfdkcaxxwxy";
url = "https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2";
};
}
]

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p nix cacert git getopt
# shellcheck shell=bash
if [ ! -d .git ]; then
echo "This script needs to be run from the root directory of nixpkgs. Exiting."
exit 1
fi
pkg_dir="$(dirname "$0")"
src="$(nix-build . --no-out-link -A coreboot-toolchain.i386.src)"
urls=$("${src}/util/crossgcc/buildgcc" -u)
tmp=$(mktemp)
echo '{ fetchurl }: [' >"$tmp"
for url in $urls; do
name="$(basename "$url")"
hash="$(nix-prefetch-url "$url")"
cat <<EOF >>"$tmp"
{
name = "$name";
archive = fetchurl {
sha256 = "$hash";
url = "$url";
};
}
EOF
done
echo ']' >>"$tmp"
sed -i -e 's/https\:\/\/ftpmirror\.gnu\.org/mirror\:\/\/gnu/g' "$tmp"
mv "$tmp" "${pkg_dir}/sources.nix"