buildLinux/linuxManualConfig: Allow .override

Regression introduced by da36847d92.

The kernelPackages NixOS module option now uses .override to add kernel
patches defined in boot.kernelPatches into the kernel within the
kernelPackages set.

For generic kernels, we already have an .override which comes with
callPackage, but pkgs.linuxManualConfig is a function where we want to
override the attributes passed to it.

The callPackage to manual-config.nix only allows us to override its
internal attributes but not the attributes of the function returned.

Simplified it looks like this:

                                      .----- .override provided by
                                    __|__    callPackage
                                   |     |
(callPackage .../manual-config.nix { ... }) { ... }
                                            |_____|
                                               |
                                  the one -----'
                                  we actually want to override

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2016-10-12 23:52:23 +02:00
parent d4a22b4de3
commit 09d3493282
No known key found for this signature in database
GPG key ID: 1DE8E48E57DB5436

View file

@ -11023,9 +11023,11 @@ in
# Intentionally lacks recurseIntoAttrs, as -rc kernels will quite likely break out-of-tree modules and cause failed Hydra builds.
linuxPackages_testing = linuxPackagesFor pkgs.linux_testing;
linuxPackages_custom = {version, src, configfile}:
recurseIntoAttrs (linuxPackagesFor (pkgs.linuxManualConfig {inherit version src configfile;
allowImportFromDerivation=true;}));
linuxPackages_custom = { version, src, configfile }:
recurseIntoAttrs (linuxPackagesFor (pkgs.linuxManualConfig {
inherit version src configfile;
allowImportFromDerivation = true;
}));
# Build a kernel for Xen dom0
linuxPackages_latest_xen_dom0 = recurseIntoAttrs (linuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }));
@ -11068,7 +11070,7 @@ in
# A function to build a manually-configured kernel
linuxManualConfig = pkgs.buildLinux;
buildLinux = callPackage ../os-specific/linux/kernel/manual-config.nix {};
buildLinux = makeOverridable (callPackage ../os-specific/linux/kernel/manual-config.nix {});
keyutils = callPackage ../os-specific/linux/keyutils { };