coreboot-toolchain: move patchShebangs outside of fetchgit

This commit fixes the issue described in detail in the commit message
of the previous commit.
This commit is contained in:
Adam Joseph 2022-05-02 03:07:28 -07:00
parent c41fc85e40
commit f18e17b2d2

View file

@ -1,4 +1,4 @@
{ lib, callPackage }:
{ stdenv, lib, callPackage }:
let
common = arch: callPackage (
{ bison
@ -22,12 +22,11 @@ let
src = fetchgit {
url = "https://review.coreboot.org/coreboot";
rev = version;
sha256 = "073n8yid3v0l9wgwnrdqrlgzaj9mnhs33a007dgr7xq3z0iw3i52";
sha256 = "sha256-PCum+IvJ136eZQLovUi9u4xTLLs17MkMP5Oc0/2mMY4=";
fetchSubmodules = false;
leaveDotGit = true;
postFetch = ''
patchShebangs $out/util/crossgcc/buildgcc
PATH=${lib.makeBinPath [ getopt ]}:$PATH $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
PATH=${lib.makeBinPath [ getopt ]}:$PATH ${stdenv.shell} $out/util/crossgcc/buildgcc -W > $out/.crossgcc_version
rm -rf $out/.git
'';
allowedRequisites = [ ];
@ -41,6 +40,8 @@ let
dontInstall = true;
postPatch = ''
patchShebangs $out/util/crossgcc/buildgcc
mkdir -p util/crossgcc/tarballs
${lib.concatMapStringsSep "\n" (