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.
This commit is contained in:
John Ericson
2018-08-30 17:20:32 -04:00
parent 2c2f1e37d4
commit 0828e2d8c3
149 changed files with 545 additions and 603 deletions
+11 -12
View File
@@ -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"; };
};