top-level: `crossSystem` is no longer exposed to packages. Use `*Platform`.

+42 -41
+4 -3
pkgs/development/compilers/ghc/head.nix
··· 1 1 { stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils 2 - , autoconf, automake, happy, alex, python3, crossSystem, selfPkgs, cross ? null 2 + , autoconf, automake, happy, alex, python3, buildPlatform, targetPlatform 3 + , selfPkgs, cross ? null 3 4 }: 4 5 5 6 let ··· 68 69 69 70 passthru = { 70 71 inherit bootPkgs; 71 - } // stdenv.lib.optionalAttrs (crossSystem != null) { 72 + } // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) { 72 73 crossCompiler = selfPkgs.ghc.override { 73 - cross = crossSystem; 74 + cross = targetPlatform; 74 75 bootPkgs = selfPkgs; 75 76 }; 76 77 };
+5 -4
pkgs/os-specific/gnu/default.nix
··· 3 3 args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool 4 4 , texinfo, glibcCross, hurdPartedCross, libuuid, samba 5 5 , gccCrossStageStatic, gccCrossStageFinal 6 - , forcedNativePackages, forceSystem, newScope, platform, config, crossSystem 6 + , forcedNativePackages, forceSystem, newScope, platform, config 7 + , targetPlatform, buildPlatform 7 8 , overrides ? {} }: 8 9 9 10 with args; ··· 19 20 libuuid = libuuid.crossDrv; 20 21 automake = automake111x; 21 22 headersOnly = false; 22 - cross = assert crossSystem != null; crossSystem; 23 + cross = assert targetPlatform != buildPlatform; targetPlatform; 23 24 gccCross = gccCrossStageFinal; 24 25 }; 25 26 ··· 30 31 libuuid = null; 31 32 automake = automake111x; 32 33 headersOnly = false; 33 - cross = assert crossSystem != null; crossSystem; 34 + cross = assert targetPlatform != buildPlatform; targetPlatform; 34 35 35 36 # The "final" GCC needs glibc and the Hurd libraries (libpthread in 36 37 # particular) so we first need an intermediate Hurd built with the ··· 63 64 inherit (gnu) machHeaders hurdHeaders; 64 65 hurd = gnu.hurdCrossIntermediate; 65 66 gccCross = gccCrossStageStatic; 66 - cross = assert crossSystem != null; crossSystem; 67 + cross = assert targetPlatform != buildPlatform; targetPlatform; 67 68 }; 68 69 69 70 # In theory GNU Mach doesn't have to be cross-compiled. However, since it
+1 -1
pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
··· 116 116 117 117 stdenv.mkDerivation { 118 118 name = "stdenv-bootstrap-tools-cross"; 119 - crossConfig = pkgsUnspliced.crossSystem.config; 119 + crossConfig = pkgsUnspliced.hostPlatform.config; 120 120 121 121 buildInputs = [nukeReferences cpio binutilsCross]; 122 122
+30 -30
pkgs/top-level/all-packages.nix
··· 27 27 28 28 callPackage_i686 = pkgsi686Linux.callPackage; 29 29 30 - forcedNativePackages = if crossSystem == null then pkgs else buildPackages; 30 + forcedNativePackages = if hostPlatform == buildPlatform then pkgs else buildPackages; 31 31 32 32 # A stdenv capable of building 32-bit binaries. On x86_64-linux, 33 33 # it uses GCC compiled with multilib support; on i686-linux, it's ··· 3246 3246 pngout = callPackage ../tools/graphics/pngout { }; 3247 3247 3248 3248 hurdPartedCross = 3249 - if crossSystem != null && crossSystem.config == "i586-pc-gnu" 3249 + if targetPlatform != buildPlatform && targetPlatform.config == "i586-pc-gnu" 3250 3250 then (makeOverridable 3251 3251 ({ hurd }: 3252 3252 (parted.override { ··· 4751 4751 4752 4752 gccApple = throw "gccApple is no longer supported"; 4753 4753 4754 - gccCrossStageStatic = assert crossSystem != null; let 4754 + gccCrossStageStatic = assert targetPlatform != buildPlatform; let 4755 4755 libcCross1 = 4756 4756 if stdenv.cross.libc == "msvcrt" then windows.mingw_w64_headers 4757 4757 else if stdenv.cross.libc == "libSystem" then darwin.xcode 4758 4758 else null; 4759 4759 in wrapGCCCross { 4760 4760 gcc = forcedNativePackages.gcc.cc.override { 4761 - cross = crossSystem; 4761 + cross = targetPlatform; 4762 4762 crossStageStatic = true; 4763 4763 langCC = false; 4764 4764 libcCross = libcCross1; ··· 4768 4768 }; 4769 4769 libc = libcCross1; 4770 4770 binutils = binutilsCross; 4771 - cross = crossSystem; 4771 + cross = targetPlatform; 4772 4772 }; 4773 4773 4774 4774 # Only needed for mingw builds 4775 - gccCrossMingw2 = assert crossSystem != null; wrapGCCCross { 4775 + gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapGCCCross { 4776 4776 gcc = gccCrossStageStatic.gcc; 4777 4777 libc = windows.mingw_headers2; 4778 4778 binutils = binutilsCross; 4779 - cross = assert crossSystem != null; crossSystem; 4779 + cross = targetPlatform; 4780 4780 }; 4781 4781 4782 - gccCrossStageFinal = assert crossSystem != null; wrapGCCCross { 4782 + gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapGCCCross { 4783 4783 gcc = forcedNativePackages.gcc.cc.override { 4784 - cross = crossSystem; 4784 + cross = targetPlatform; 4785 4785 crossStageStatic = false; 4786 4786 4787 4787 # XXX: We have troubles cross-compiling libstdc++ on MinGW (see 4788 4788 # <http://hydra.nixos.org/build/4268232>), so don't even try. 4789 - langCC = crossSystem.config != "i686-pc-mingw32"; 4789 + langCC = targetPlatform.config != "i686-pc-mingw32"; 4790 4790 # Why is this needed? 4791 4791 inherit (forcedNativePackages) binutilsCross; 4792 4792 }; 4793 4793 libc = libcCross; 4794 4794 binutils = binutilsCross; 4795 - cross = crossSystem; 4795 + cross = targetPlatform; 4796 4796 }; 4797 4797 4798 4798 gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 { ··· 4810 4810 # and host != build), `cross' must be null but the cross-libc must still 4811 4811 # be passed. 4812 4812 cross = null; 4813 - libcCross = if crossSystem != null then libcCross else null; 4813 + libcCross = if targetPlatform != buildPlatform then libcCross else null; 4814 4814 })); 4815 4815 4816 4816 gcc48 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.8 { ··· 4823 4823 # and host != build), `cross' must be null but the cross-libc must still 4824 4824 # be passed. 4825 4825 cross = null; 4826 - libcCross = if crossSystem != null then libcCross else null; 4826 + libcCross = if targetPlatform != buildPlatform then libcCross else null; 4827 4827 4828 4828 isl = if !stdenv.isDarwin then isl_0_14 else null; 4829 4829 cloog = if !stdenv.isDarwin then cloog else null; ··· 4840 4840 # and host != build), `cross' must be null but the cross-libc must still 4841 4841 # be passed. 4842 4842 cross = null; 4843 - libcCross = if crossSystem != null then libcCross else null; 4843 + libcCross = if targetPlatform != buildPlatform then libcCross else null; 4844 4844 4845 4845 isl = if !stdenv.isDarwin then isl_0_11 else null; 4846 4846 ··· 4857 4857 # and host != build), `cross' must be null but the cross-libc must still 4858 4858 # be passed. 4859 4859 cross = null; 4860 - libcCross = if crossSystem != null then libcCross else null; 4860 + libcCross = if targetPlatform != buildPlatform then libcCross else null; 4861 4861 4862 4862 isl = if !stdenv.isDarwin then isl_0_14 else null; 4863 4863 })); ··· 4872 4872 # and host != build), `cross' must be null but the cross-libc must still 4873 4873 # be passed. 4874 4874 cross = null; 4875 - libcCross = if crossSystem != null then libcCross else null; 4875 + libcCross = if targetPlatform != buildPlatform then libcCross else null; 4876 4876 4877 4877 isl = if !stdenv.isDarwin then isl_0_14 else null; 4878 4878 })); ··· 5005 5005 5006 5006 # Haskell and GHC 5007 5007 5008 - haskell = callPackage ./haskell-packages.nix { inherit crossSystem; }; 5008 + haskell = callPackage ./haskell-packages.nix { }; 5009 5009 5010 5010 haskellPackages = haskell.packages.ghc801.override { 5011 5011 overrides = config.haskellPackageOverrides or (self: super: {}); ··· 6068 6068 gold = false; 6069 6069 }); 6070 6070 6071 - binutilsCross = assert crossSystem != null; lowPrio ( 6072 - if crossSystem.libc == "libSystem" then darwin.cctools_cross 6071 + binutilsCross = assert targetPlatform != buildPlatform; lowPrio ( 6072 + if targetPlatform.libc == "libSystem" then darwin.cctools_cross 6073 6073 else forcedNativePackages.binutils.override { 6074 6074 noSysDirs = true; 6075 - cross = crossSystem; 6075 + cross = targetPlatform; 6076 6076 }); 6077 6077 6078 6078 bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { }; ··· 6718 6718 gdbGuile = lowPrio (gdb.override { inherit guile; }); 6719 6719 6720 6720 gdbCross = lowPrio (callPackage ../development/tools/misc/gdb { 6721 - target = crossSystem; 6721 + target = if targetPlatform != buildPlatform then targetPlatform else null; 6722 6722 }); 6723 6723 6724 6724 gdb-multitarget = lowPrio (gdb.override { multitarget = true; }); ··· 7332 7332 else if name == "libSystem" then darwin.xcode 7333 7333 else throw "Unknown libc"; 7334 7334 7335 - libcCross = assert crossSystem != null; libcCrossChooser crossSystem.libc; 7335 + libcCross = assert targetPlatform != buildPlatform; libcCrossChooser targetPlatform.libc; 7336 7336 7337 7337 # Only supported on Linux 7338 7338 glibcLocales = if stdenv.isLinux then callPackage ../development/libraries/glibc/locales.nix { } else null; ··· 10895 10895 apple-source-releases = callPackage ../os-specific/darwin/apple-source-releases { }; 10896 10896 in apple-source-releases // rec { 10897 10897 cctools_cross = callPackage (forcedNativePackages.callPackage ../os-specific/darwin/cctools/port.nix {}).cross { 10898 - cross = assert crossSystem != null; crossSystem; 10898 + cross = assert targetPlatform != buildPlatform; targetPlatform; 10899 10899 inherit maloader; 10900 10900 xctoolchain = xcode.toolchain; 10901 10901 }; ··· 10968 10968 libossp_uuid = callPackage ../development/libraries/libossp-uuid { }; 10969 10969 10970 10970 libuuid = 10971 - if crossSystem != null && crossSystem.config == "i586-pc-gnu" 10971 + if targetPlatform != buildPlatform && targetPlatform.config == "i586-pc-gnu" 10972 10972 then (utillinuxMinimal // { 10973 10973 crossDrv = lib.overrideDerivation utillinuxMinimal.crossDrv (args: { 10974 10974 # `libblkid' fails to build on GNU/Hurd. ··· 11053 11053 11054 11054 # GNU/Hurd core packages. 11055 11055 gnu = recurseIntoAttrs (callPackage ../os-specific/gnu { 11056 - inherit platform crossSystem; 11056 + inherit platform; 11057 11057 }); 11058 11058 11059 11059 hwdata = callPackage ../os-specific/linux/hwdata { }; ··· 11133 11133 linuxHeaders = linuxHeaders_4_4; 11134 11134 11135 11135 linuxHeaders24Cross = forcedNativePackages.callPackage ../os-specific/linux/kernel-headers/2.4.nix { 11136 - cross = assert crossSystem != null; crossSystem; 11136 + cross = assert targetPlatform != buildPlatform; targetPlatform; 11137 11137 }; 11138 11138 11139 11139 linuxHeaders26Cross = forcedNativePackages.callPackage ../os-specific/linux/kernel-headers/4.4.nix { 11140 - cross = assert crossSystem != null; crossSystem; 11140 + cross = assert targetPlatform != buildPlatform; targetPlatform; 11141 11141 }; 11142 11142 11143 11143 linuxHeaders_3_18 = callPackage ../os-specific/linux/kernel-headers/3.18.nix { }; ··· 11149 11149 else if ver == "2.6" then linuxHeaders26Cross 11150 11150 else throw "Unknown linux kernel version"; 11151 11151 11152 - linuxHeadersCross = assert crossSystem != null; 11153 - linuxHeadersCrossChooser crossSystem.platform.kernelMajor; 11152 + linuxHeadersCross = assert targetPlatform != buildPlatform; 11153 + linuxHeadersCrossChooser targetPlatform.platform.kernelMajor; 11154 11154 11155 11155 kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { }; 11156 11156 ··· 11812 11812 uclibcCross = lowPrio (callPackage ../os-specific/linux/uclibc { 11813 11813 linuxHeaders = linuxHeadersCross; 11814 11814 gccCross = gccCrossStageStatic; 11815 - cross = assert crossSystem != null; crossSystem; 11815 + cross = assert targetPlatform != buildPlatform; targetPlatform; 11816 11816 }); 11817 11817 11818 11818 udev = systemd;
+2 -2
pkgs/top-level/haskell-packages.nix
··· 1 - { pkgs, callPackage, stdenv, crossSystem }: 1 + { pkgs, callPackage, stdenv, buildPlatform, targetPlatform }: 2 2 3 3 rec { 4 4 ··· 55 55 ghcHEAD = callPackage ../development/compilers/ghc/head.nix rec { 56 56 bootPkgs = packages.ghc7103; 57 57 inherit (bootPkgs) alex happy; 58 - inherit crossSystem; 58 + inherit buildPlatform targetPlatform; 59 59 selfPkgs = packages.ghcHEAD; 60 60 }; 61 61 ghcjs = packages.ghc7103.callPackage ../development/compilers/ghcjs {
-1
pkgs/top-level/stage.nix
··· 101 101 cross = targetPlatform; 102 102 }; 103 103 inherit (buildPlatform) system platform; 104 - crossSystem = if targetPlatform != buildPlatform then targetPlatform else null; 105 104 }; 106 105 107 106 splice = self: super: import ./splice.nix lib self;