kernel/generic.nix: Add a passed-thru modDirVersion attribute

With the new kernel versioning scheme, the first release in a series only has a version number and
a major revision number (e.g. linux 3.0, linux 3.1-rc1, etc.). Unfortunately, the module
directory for these kernels still has a minor revision number (e.g. lib/modules/3.0.0, lib/modules/3.0.1-rc1, etc.).
This causes problems for packages such as broadcom_sta that need to know the module directory, so
this attribute will allow setting the module directory version number separate from the
kernel version number when necessary.

svn path=/nixpkgs/trunk/; revision=28405
This commit is contained in:
Shea Levy 2011-08-08 20:49:49 +00:00
parent 56cf7dfe4a
commit ffdc37215a

View file

@ -6,6 +6,9 @@
, # The kernel version.
version
, # The version number used for the module directory
modDirVersion ? version
, # The kernel configuration.
config
@ -66,7 +69,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
passthru = {
inherit version;
inherit version modDirVersion;
# 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;
};