From 0828e2d8c369604c56219bd7085256b984087280 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 20 Aug 2018 14:43:41 -0400 Subject: treewide: Remove usage of remaining redundant platform compatability stuff Want to get this out of here for 18.09, so it can be deprecated thereafter. --- pkgs/os-specific/linux/kernel/generic.nix | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'pkgs/os-specific/linux/kernel/generic.nix') diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 4af5e80a655..e424dff596d 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -35,15 +35,14 @@ # symbolic name and `patch' is the actual patch. The patch may # optionally be compressed with gzip or bzip2. kernelPatches ? [] -, ignoreConfigErrors ? hostPlatform.platform.name != "pc" || - hostPlatform != stdenv.buildPlatform +, ignoreConfigErrors ? stdenv.hostPlatform.platform.name != "pc" || + stdenv.hostPlatform != stdenv.buildPlatform , extraMeta ? {} -, hostPlatform -# easy overrides to hostPlatform.platform members -, autoModules ? hostPlatform.platform.kernelAutoModules -, preferBuiltin ? hostPlatform.platform.kernelPreferBuiltin or false -, kernelArch ? hostPlatform.platform.kernelArch +# easy overrides to stdenv.hostPlatform.platform members +, autoModules ? stdenv.hostPlatform.platform.kernelAutoModules +, preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false +, kernelArch ? stdenv.hostPlatform.platform.kernelArch , mkValueOverride ? null , ... @@ -69,7 +68,7 @@ let inherit stdenv version structuredExtraConfig mkValueOverride; # append extraConfig for backwards compatibility but also means the user can't override the kernelExtraConfig part - extraConfig = extraConfig + lib.optionalString (hostPlatform.platform ? kernelExtraConfig) hostPlatform.platform.kernelExtraConfig; + extraConfig = extraConfig + lib.optionalString (stdenv.hostPlatform.platform ? kernelExtraConfig) stdenv.hostPlatform.platform.kernelExtraConfig; features = kernelFeatures; # Ensure we know of all extra patches, etc. }; @@ -93,11 +92,11 @@ let nativeBuildInputs = [ perl ] ++ lib.optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]; - platformName = hostPlatform.platform.name; + platformName = stdenv.hostPlatform.platform.name; # e.g. "defconfig" - kernelBaseConfig = if defconfig != null then defconfig else hostPlatform.platform.kernelBaseConfig; + kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.platform.kernelBaseConfig; # e.g. "bzImage" - kernelTarget = hostPlatform.platform.kernelTarget; + kernelTarget = stdenv.hostPlatform.platform.kernelTarget; prePatch = kernel.prePatch + '' # Patch kconfig to print "###" after every question so that @@ -128,7 +127,7 @@ let }; kernel = (callPackage ./manual-config.nix {}) { - inherit version modDirVersion src kernelPatches stdenv extraMeta configfile hostPlatform; + inherit version modDirVersion src kernelPatches stdenv extraMeta configfile; config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; }; }; -- cgit 1.4.1