diff options
author | K900 <me@0upti.me> | 2024-06-21 18:24:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-21 18:24:28 +0300 |
commit | d17e2eb0250ea058bd7c6faa808310ef4c207054 (patch) | |
tree | 2a67d6a2a9c1ab08a14101e935ddde7cc954d866 /pkgs/os-specific | |
parent | 93aebb9971bdefbb8effef74fee6fe0a1876bdd0 (diff) | |
parent | 2f3e0581ef13d2fea32b640dd4352389abb09f50 (diff) |
Merge pull request #321078 from philiptaron/issue-271473/linux-kernel
linuxKernel: depend exclusively on elfutils
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kernel/generic.nix | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/manual-config.nix | 32 |
2 files changed, 21 insertions, 14 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 081cfcaa8b60f..5981de6732426 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -140,8 +140,7 @@ let passAsFile = [ "kernelConfig" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ perl gmp libmpc mpfr ] - ++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ] + nativeBuildInputs = [ perl gmp libmpc mpfr bison flex ] ++ lib.optional (lib.versionAtLeast version "5.2") pahole ++ lib.optionals withRust [ rust-bindgen rustc ] ; diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 3060ff9ef775a..323b77e851404 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,24 @@ 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 = [ + bison + flex + perl + bc + nettools + openssl + rsync + gmp + libmpc + mpfr + elfutils + zstd + python3Minimal + kmod + ] ++ optional needsUbootTools ubootTools + ++ optionals (lib.versionAtLeast version "5.2") [ cpio pahole zlib ] + ++ optionals withRust [ rustc rust-bindgen ]; RUST_LIB_SRC = lib.optionalString withRust rustPlatform.rustLibSrc; @@ -400,9 +411,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; |