diff --git a/pkgs/os-specific/linux/kernel-headers/4.4.nix b/pkgs/os-specific/linux/kernel-headers/4.4.nix index 716ad799bc64..0ef5280d13b6 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. 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 da67747b8b24..000000000000 --- 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; -}