From 09d349328255660c6e29d37d8e795b004e002226 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 12 Oct 2016 23:52:23 +0200 Subject: [PATCH] buildLinux/linuxManualConfig: Allow .override Regression introduced by da36847d925058fd86f027b64cc712c57be11ad8. 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 --- pkgs/top-level/all-packages.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dc4370e9eed..731f5ed0880 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };