diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix')
-rw-r--r-- | nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix b/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix index a2a63e2bcab2..9d727838b3fb 100644 --- a/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix @@ -1,4 +1,9 @@ -{ stdenvNoCC, lib, buildPackages, fetchurl, perl, elf-header }: +{ stdenvNoCC, lib, buildPackages, fetchurl, perl, elf-header +, bison ? null, flex ? null, python ? null, rsync ? null +}: + +assert stdenvNoCC.hostPlatform.isAndroid -> + (flex != null && bison != null && python != null && rsync != null); let makeLinuxHeaders = { src, version, patches ? [] }: stdenvNoCC.mkDerivation { @@ -13,7 +18,11 @@ let # We do this so we have a build->build, not build->host, C compiler. depsBuildBuild = [ buildPackages.stdenv.cc ]; # `elf-header` is null when libc provides `elf.h`. - nativeBuildInputs = [ perl elf-header ]; + nativeBuildInputs = [ + perl elf-header + ] ++ lib.optionals stdenvNoCC.hostPlatform.isAndroid [ + flex bison python rsync + ]; extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"]; @@ -36,9 +45,12 @@ let # Skip clean on darwin, case-sensitivity issues. buildPhase = lib.optionalString (!stdenvNoCC.buildPlatform.isDarwin) '' make mrproper $makeFlags - '' + '' + '' + (if stdenvNoCC.hostPlatform.isAndroid then '' + make defconfig + make headers_install + '' else '' make headers $makeFlags - ''; + ''); checkPhase = '' make headers_check $makeFlags @@ -69,12 +81,12 @@ let in { inherit makeLinuxHeaders; - linuxHeaders = let version = "5.11"; in + linuxHeaders = let version = "5.12"; in makeLinuxHeaders { inherit version; src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1d37w0zvmf8c1l99xvy1hy6p55icjhmbsv7f0amxy2nly1a7pw04"; + sha256 = "sha256-fQ328r8jhNaNC9jh/j4HHWQ2Tc3GAC57XIfJLUj6w2Y="; }; patches = [ ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms |