Merge pull request #143248 from felixsinger/pkgs/coreboot-toolchain/update

coreboot-toolchain: Rework and update to latest release

authored by maralorn and committed by GitHub b3e1ea23 2687418a

+46 -24
+23 -6
pkgs/development/tools/misc/coreboot-toolchain/default.nix
··· 1 - { callPackage, fetchgit, lib, stdenvNoCC 2 - , bison, curl, git, perl 3 - , flex, gnat11, zlib 4 }: 5 6 stdenvNoCC.mkDerivation rec { 7 pname = "coreboot-toolchain"; 8 - version = "4.14"; 9 10 src = fetchgit { 11 url = "https://review.coreboot.org/coreboot"; 12 rev = version; 13 - sha256 = "00xr74yc0kj9rrqa1a8b7bih865qlp9i4zs67ysavkfrjrwwssxm"; 14 }; 15 16 nativeBuildInputs = [ bison curl git perl ]; ··· 28 ) (callPackage ./stable.nix { }) 29 } 30 31 - patchShebangs util/genbuild_h/genbuild_h.sh util/crossgcc/buildgcc 32 ''; 33 34 buildPhase = '' 35 make crossgcc-i386 CPUS=$NIX_BUILD_CORES DEST=$out 36 ''; 37
··· 1 + { bison 2 + , callPackage 3 + , curl 4 + , fetchgit 5 + , flex 6 + , getopt 7 + , git 8 + , gnat11 9 + , lib 10 + , perl 11 + , stdenvNoCC 12 + , zlib 13 }: 14 15 stdenvNoCC.mkDerivation rec { 16 pname = "coreboot-toolchain"; 17 + version = "4.15"; 18 19 src = fetchgit { 20 url = "https://review.coreboot.org/coreboot"; 21 rev = version; 22 + sha256 = "1qsb2ca22h5f0iwc254qsfm7qcn8967ir8aybdxa1pakgmnfsyp9"; 23 + fetchSubmodules = false; 24 + leaveDotGit = true; 25 + postFetch = '' 26 + patchShebangs $out/util/crossgcc/buildgcc 27 + PATH=${lib.makeBinPath [ getopt ]}:$PATH $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version 28 + rm -rf $out/.git 29 + ''; 30 }; 31 32 nativeBuildInputs = [ bison curl git perl ]; ··· 44 ) (callPackage ./stable.nix { }) 45 } 46 47 + patchShebangs util/genbuild_h/genbuild_h.sh 48 ''; 49 50 buildPhase = '' 51 + export CROSSGCC_VERSION=$(cat .crossgcc_version) 52 make crossgcc-i386 CPUS=$NIX_BUILD_CORES DEST=$out 53 ''; 54
+15 -15
pkgs/development/tools/misc/coreboot-toolchain/stable.nix
··· 1 { fetchurl }: [ 2 { 3 - name = "gmp-6.2.0.tar.xz"; 4 archive = fetchurl { 5 - sha256 = "09hmg8k63mbfrx1x3yy6y1yzbbq85kw5avbibhcgrg9z3ganr3i5"; 6 - url = "mirror://gnu/gmp/gmp-6.2.0.tar.xz"; 7 }; 8 } 9 { ··· 14 }; 15 } 16 { 17 - name = "mpc-1.2.0.tar.gz"; 18 archive = fetchurl { 19 - sha256 = "19pxx3gwhwl588v496g3aylhcw91z1dk1d5x3a8ik71sancjs3z9"; 20 - url = "mirror://gnu/mpc/mpc-1.2.0.tar.gz"; 21 }; 22 } 23 { 24 - name = "gcc-8.3.0.tar.xz"; 25 archive = fetchurl { 26 - sha256 = "0b3xv411xhlnjmin2979nxcbnidgvzqdf4nbhix99x60dkzavfk4"; 27 - url = "mirror://gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"; 28 }; 29 } 30 { 31 - name = "binutils-2.35.1.tar.xz"; 32 archive = fetchurl { 33 - sha256 = "01w6xvfy7sjpw8j08k111bnkl27j760bdsi0wjvq44ghkgdr3v9w"; 34 - url = "mirror://gnu/binutils/binutils-2.35.1.tar.xz"; 35 }; 36 } 37 { 38 - name = "acpica-unix2-20200925.tar.gz"; 39 archive = fetchurl { 40 - sha256 = "18n6129fkgj85piid7v4zxxksv3h0amqp4p977vcl9xg3bq0zd2w"; 41 - url = "https://acpica.org/sites/acpica/files/acpica-unix2-20200925.tar.gz"; 42 }; 43 } 44 {
··· 1 { fetchurl }: [ 2 { 3 + name = "gmp-6.2.1.tar.xz"; 4 archive = fetchurl { 5 + sha256 = "1wml97fdmpcynsbw9yl77rj29qibfp652d0w3222zlfx5j8jjj7x"; 6 + url = "mirror://gnu/gmp/gmp-6.2.1.tar.xz"; 7 }; 8 } 9 { ··· 14 }; 15 } 16 { 17 + name = "mpc-1.2.1.tar.gz"; 18 archive = fetchurl { 19 + sha256 = "0n846hqfqvmsmim7qdlms0qr86f1hck19p12nq3g3z2x74n3sl0p"; 20 + url = "mirror://gnu/mpc/mpc-1.2.1.tar.gz"; 21 }; 22 } 23 { 24 + name = "gcc-11.2.0.tar.xz"; 25 archive = fetchurl { 26 + sha256 = "12zs6vd2rapp42x154m479hg3h3lsafn3xhg06hp5hsldd9xr3nh"; 27 + url = "mirror://gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.xz"; 28 }; 29 } 30 { 31 + name = "binutils-2.37.tar.xz"; 32 archive = fetchurl { 33 + sha256 = "0b53hhgfnafw27y0c3nbmlfidny2cc5km29pnfffd8r0y0j9f3c2"; 34 + url = "mirror://gnu/binutils/binutils-2.37.tar.xz"; 35 }; 36 } 37 { 38 + name = "acpica-unix2-20210331.tar.gz"; 39 archive = fetchurl { 40 + sha256 = "1h98pvc9iy1c49cid0ppjwk5zsy2m1xbvfqb72pkwkrd4rn35arx"; 41 + url = "https://acpica.org/sites/acpica/files/acpica-unix2-20210331.tar.gz"; 42 }; 43 } 44 {
+8 -3
pkgs/development/tools/misc/coreboot-toolchain/update.sh
··· 1 #!/usr/bin/env nix-shell 2 #!nix-shell --pure -i bash -p nix cacert git getopt 3 4 - rootdir="../../../../../" 5 6 - src="$(nix-build $rootdir --no-out-link -A coreboot-toolchain.src)" 7 urls=$($src/util/crossgcc/buildgcc -u) 8 9 tmp=$(mktemp) ··· 28 29 sed -ie 's/https\:\/\/ftpmirror\.gnu\.org/mirror\:\/\/gnu/g' $tmp 30 31 - mv $tmp sources.nix
··· 1 #!/usr/bin/env nix-shell 2 #!nix-shell --pure -i bash -p nix cacert git getopt 3 4 + if [ ! -d .git ]; then 5 + echo "This script needs to be run from the root directory of nixpkgs. Exiting." 6 + exit 1 7 + fi 8 + 9 + pkg_dir="$(dirname "$0")" 10 11 + src="$(nix-build . --no-out-link -A coreboot-toolchain.src)" 12 urls=$($src/util/crossgcc/buildgcc -u) 13 14 tmp=$(mktemp) ··· 33 34 sed -ie 's/https\:\/\/ftpmirror\.gnu\.org/mirror\:\/\/gnu/g' $tmp 35 36 + mv $tmp $pkg_dir/sources.nix