Cleaner decoupling of glibc and linuxPackages while keeping kernelHeaders a linuxPackage and having a single default.nix for kernelHeaders

svn path=/nixpkgs/branches/stdenv-updates/; revision=29554
This commit is contained in:
Shea Levy 2011-10-01 22:25:28 +00:00
parent 3b260bfbf7
commit d3cf97b56e
3 changed files with 13 additions and 10 deletions

View File

@ -3,7 +3,7 @@
assert cross == null -> stdenv.isLinux; assert cross == null -> stdenv.isLinux;
let let
version = kernel.headersVersion; version = kernel.version;
kernelHeadersBaseConfig = if (cross == null) then kernelHeadersBaseConfig = if (cross == null) then
stdenv.platform.kernelHeadersBaseConfig stdenv.platform.kernelHeadersBaseConfig
else else
@ -13,7 +13,7 @@ in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "linux-headers-${version}"; name = "linux-headers-${version}";
src = kernel.headersSrc; src = kernel.src;
targetConfig = if (cross != null) then cross.config else null; targetConfig = if (cross != null) then cross.config else null;

View File

@ -3,15 +3,9 @@
, # The kernel source tarball. , # The kernel source tarball.
src src
, # The kernel headers source tarball.
headersSrc ? src
, # The kernel version. , # The kernel version.
version version
, # The kernel headers version.
headersVersion ? version
, # The version number used for the module directory , # The version number used for the module directory
modDirVersion ? version modDirVersion ? version
@ -75,7 +69,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true; enableParallelBuilding = true;
passthru = { passthru = {
inherit version modDirVersion kernelPatches headersSrc headersVersion; inherit version modDirVersion kernelPatches;
# Combine the `features' attribute sets of all the kernel patches. # Combine the `features' attribute sets of all the kernel patches.
features = lib.fold (x: y: (if x ? features then x.features else {}) // y) features kernelPatches; features = lib.fold (x: y: (if x ? features then x.features else {}) // y) features kernelPatches;
}; };

View File

@ -5242,7 +5242,16 @@ let
libnl1 = callPackage ../os-specific/linux/libnl/v1.nix { }; libnl1 = callPackage ../os-specific/linux/libnl/v1.nix { };
linuxHeaders = linuxPackages.kernelHeaders; linuxHeaders =
let
kernel = {
src = linuxPackages.kernel.src;
version = linuxPackages.kernel.version;
};
in
callPackage ../os-specific/linux/kernel-headers { inherit kernel; };
linuxHeaders26Cross = forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix { linuxHeaders26Cross = forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix {
inherit stdenv fetchurl perl; inherit stdenv fetchurl perl;