From fb5d7b218d940e99e5cf86c5940175ea02dcc065 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 14 Sep 2017 19:23:53 -0400 Subject: [PATCH 1/2] linux-headers: Remove dead old version This sat around unused for who knows how long --- .../linux/kernel-headers/default.nix | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 pkgs/os-specific/linux/kernel-headers/default.nix diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix deleted file mode 100644 index da67747b8b2..00000000000 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, kernel, perl -, hostPlatform -}: - -let - baseBuildFlags = [ "INSTALL_HDR_PATH=$(out)" "headers_install" ]; -in stdenv.mkDerivation { - name = "linux-headers-${kernel.version}"; - - inherit (kernel) src patches; - - nativeBuildInputs = [ perl ]; - - buildFlags = [ "ARCH=${stdenv.platform.kernelArch}" ] ++ baseBuildFlags; - - crossAttrs = { - inherit (kernel.crossDrv) src patches; - buildFlags = [ "ARCH=${hostPlatform.platform.kernelArch}" ] ++ baseBuildFlags; - }; - - installPhase = '' - find $out \( -name ..install.cmd -o -name .install \) -print0 | xargs -0 rm - ''; - - # Headers shouldn't reference anything else - allowedReferences = []; - - meta.platforms = stdenv.lib.platforms.linux; -} From 81680d44c8733acf8feb69c0c787de5224bf4301 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 14 Sep 2017 19:24:48 -0400 Subject: [PATCH 2/2] linux-headers 4.4: Remove arch fallback code @dezgeg was right: The `platform` field of a linux platorm is already manadatory---if not specified it is inferred, and all such inferences include a `kernelArch` field. Therefore linux packages can indeed rely on it being defined. --- pkgs/os-specific/linux/kernel-headers/4.4.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/kernel-headers/4.4.nix b/pkgs/os-specific/linux/kernel-headers/4.4.nix index 716ad799bc6..0ef5280d13b 100644 --- a/pkgs/os-specific/linux/kernel-headers/4.4.nix +++ b/pkgs/os-specific/linux/kernel-headers/4.4.nix @@ -20,12 +20,7 @@ stdenvNoCC.mkDerivation { targetConfig = if hostPlatform != buildPlatform then hostPlatform.config else null; - platform = hostPlatform.platform.kernelArch or ( - if hostPlatform.system == "i686-linux" then "i386" else - if hostPlatform.system == "x86_64-linux" then "x86_64" else - if hostPlatform.system == "powerpc-linux" then "powerpc" else - if hostPlatform.isArm then "arm" else - abort "don't know what the kernel include directory is called for this platform"); + platform = hostPlatform.platform.kernelArch; # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc. # We do this so we have a build->build, not build->host, C compiler.