kernel/manual-config: simplify ld-version sed with patchShebangs.

This commit is contained in:
Blaž Hrastnik 2020-12-03 18:21:25 +09:00 committed by Atemu
parent 3da6ec1d6a
commit 2d0ba1f54b

View File

@ -1,5 +1,5 @@
{ buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
, libelf, cpio, elfutils
, libelf, cpio, elfutils, gawk
, writeTextFile
}:
@ -120,7 +120,7 @@ let
# See also https://kernelnewbies.org/BuildId
sed -i Makefile -e 's|--build-id|--build-id=none|'
sed -i scripts/ld-version.sh -e "s|/usr/bin/awk|${buildPackages.gawk}/bin/awk|"
patchShebangs scripts/ld-version.sh
'';
postPatch = ''
@ -306,7 +306,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
enableParallelBuilding = true;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk ]
++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools
++ optional (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") libelf
# Removed util-linuxMinimal since it should not be a dependency.