From 61ab7e84de28ec85dc026a88301f7aa63d2aa1d7 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sun, 11 Jul 2021 22:11:21 -0700 Subject: [PATCH] linuxManualConfig: patch all shebangs in scripts/ There are many scripts in `scripts/` which may be called by the build, depending on how the user chooses to configure the kernel. For example, `scripts/jobserver-exec` is called whenever the kernel is being built with LLVM tooling, and without this patch that build will fail due to the broken shebang. This patch makes us fix _all_ scripts, as well as add a dependency on python3Minimal, since a lot of the aforementioned scripts are written in Python3 instead of shell. --- pkgs/os-specific/linux/kernel/manual-config.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index fda2881a8d2a..d40a36936a26 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -1,5 +1,5 @@ { lib, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl -, libelf, cpio, elfutils, zstd, gawk +, libelf, cpio, elfutils, zstd, gawk, python3Minimal , writeTextFile }: @@ -121,7 +121,7 @@ let # See also https://kernelnewbies.org/BuildId sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|' - patchShebangs scripts/ld-version.sh + patchShebangs scripts ''; postPatch = '' @@ -307,7 +307,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat enableParallelBuilding = true; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd ] + nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd python3Minimal ] ++ optional (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools ++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf # Removed util-linuxMinimal since it should not be a dependency.