From aab56516622666292b14b23eb7d39f6fbf9ace52 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Tue, 18 Jun 2024 14:54:33 -0700 Subject: [PATCH] linuxKernel: depend exclusively on elfutils --- .../linux/kernel/manual-config.nix | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 3060ff9ef775..b54b13a53d92 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -1,5 +1,5 @@ { lib, stdenv, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl -, libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole, kmod, ubootTools +, cpio, elfutils, zstd, python3Minimal, zlib, pahole, kmod, ubootTools , fetchpatch , rustc, rust-bindgen, rustPlatform }: @@ -120,7 +120,7 @@ let moduleBuildDependencies = [ pahole perl - libelf + elfutils # module makefiles often run uname commands to find out the kernel version (buildPackages.deterministic-uname.override { inherit modDirVersion; }) ] @@ -142,13 +142,23 @@ let inherit src; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr zstd python3Minimal kmod ] - ++ optional needsUbootTools ubootTools - ++ optional (lib.versionOlder version "5.8") libelf - ++ optionals (lib.versionAtLeast version "4.16") [ bison flex ] - ++ optionals (lib.versionAtLeast version "5.2") [ cpio pahole zlib ] - ++ optional (lib.versionAtLeast version "5.8") elfutils - ++ optionals withRust [ rustc rust-bindgen ]; + nativeBuildInputs = [ + perl + bc + nettools + openssl + rsync + gmp + libmpc + mpfr + elfutils + zstd + python3Minimal + kmod + ] ++ optional needsUbootTools ubootTools + ++ optionals (lib.versionAtLeast version "4.16") [ bison flex ] + ++ optionals (lib.versionAtLeast version "5.2") [ cpio pahole zlib ] + ++ optionals withRust [ rustc rust-bindgen ]; RUST_LIB_SRC = lib.optionalString withRust rustPlatform.rustLibSrc; @@ -400,9 +410,6 @@ let }; in -assert lib.versionOlder version "5.8" -> libelf != null; -assert lib.versionAtLeast version "5.8" -> elfutils != null; - stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPatches configfile) // { inherit pname version;