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

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