git.iko.soy/typeable/nixpkgs
on master help sign in
top-level: `crossSystem` is no longer exposed to packages. Use `*Platform`.
commita1a798f01788bc3efe4ca477f2c9e8545eeafddc authorJohn Ericson <Ericson2314@Yahoo.com> dateSun 15 Jan 2017, 17:31 (10 years ago) parent1c0365b
6 files changed+42−41
pkgs/development/compilers/ghc/head.nix+4−3 pkgs/os-specific/gnu/default.nix+5−4 pkgs/stdenv/linux/make-bootstrap-tools-cross.nix+1−1 pkgs/top-level/all-packages.nix+30−30 pkgs/top-level/haskell-packages.nix+2−2 pkgs/top-level/stage.nix−1
pkgs/development/compilers/ghc/head.nix+4−3
@@ -1,5 +1,6 @@
11{ 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
34}:
45
56let
@@ -68,9 +69,9 @@ in stdenv.mkDerivation (rec {
6869
6970 passthru = {
7071 inherit bootPkgs;
71− } // stdenv.lib.optionalAttrs (crossSystem != null) {
72+ } // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) {
7273 crossCompiler = selfPkgs.ghc.override {
73− cross = crossSystem;
74+ cross = targetPlatform;
7475 bootPkgs = selfPkgs;
7576 };
7677 };
pkgs/os-specific/gnu/default.nix+5−4
@@ -3,7 +3,8 @@
33args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
44, texinfo, glibcCross, hurdPartedCross, libuuid, samba
55, gccCrossStageStatic, gccCrossStageFinal
6−, forcedNativePackages, forceSystem, newScope, platform, config, crossSystem
6+, forcedNativePackages, forceSystem, newScope, platform, config
7+, targetPlatform, buildPlatform
78, overrides ? {} }:
89
910with args;
@@ -19,7 +20,7 @@ let
1920 libuuid = libuuid.crossDrv;
2021 automake = automake111x;
2122 headersOnly = false;
22− cross = assert crossSystem != null; crossSystem;
23+ cross = assert targetPlatform != buildPlatform; targetPlatform;
2324 gccCross = gccCrossStageFinal;
2425 };
2526
@@ -30,7 +31,7 @@ let
3031 libuuid = null;
3132 automake = automake111x;
3233 headersOnly = false;
33− cross = assert crossSystem != null; crossSystem;
34+ cross = assert targetPlatform != buildPlatform; targetPlatform;
3435
3536 # The "final" GCC needs glibc and the Hurd libraries (libpthread in
3637 # particular) so we first need an intermediate Hurd built with the
@@ -63,7 +64,7 @@ let
6364 inherit (gnu) machHeaders hurdHeaders;
6465 hurd = gnu.hurdCrossIntermediate;
6566 gccCross = gccCrossStageStatic;
66− cross = assert crossSystem != null; crossSystem;
67+ cross = assert targetPlatform != buildPlatform; targetPlatform;
6768 };
6869
6970 # In theory GNU Mach doesn't have to be cross-compiled. However, since it
pkgs/stdenv/linux/make-bootstrap-tools-cross.nix+1−1
@@ -116,7 +116,7 @@ rec {
116116
117117 stdenv.mkDerivation {
118118 name = "stdenv-bootstrap-tools-cross";
119− crossConfig = pkgsUnspliced.crossSystem.config;
119+ crossConfig = pkgsUnspliced.hostPlatform.config;
120120
121121 buildInputs = [nukeReferences cpio binutilsCross];
122122
pkgs/top-level/all-packages.nix+30−30
@@ -27,7 +27,7 @@ with pkgs;
2727
2828 callPackage_i686 = pkgsi686Linux.callPackage;
2929
30− forcedNativePackages = if crossSystem == null then pkgs else buildPackages;
30+ forcedNativePackages = if hostPlatform == buildPlatform then pkgs else buildPackages;
3131
3232 # A stdenv capable of building 32-bit binaries. On x86_64-linux,
3333 # it uses GCC compiled with multilib support; on i686-linux, it's
@@ -3246,7 +3246,7 @@ with pkgs;
32463246 pngout = callPackage ../tools/graphics/pngout { };
32473247
32483248 hurdPartedCross =
3249− if crossSystem != null && crossSystem.config == "i586-pc-gnu"
3249+ if targetPlatform != buildPlatform && targetPlatform.config == "i586-pc-gnu"
32503250 then (makeOverridable
32513251 ({ hurd }:
32523252 (parted.override {
@@ -4751,14 +4751,14 @@ with pkgs;
47514751
47524752 gccApple = throw "gccApple is no longer supported";
47534753
4754− gccCrossStageStatic = assert crossSystem != null; let
4754+ gccCrossStageStatic = assert targetPlatform != buildPlatform; let
47554755 libcCross1 =
47564756 if stdenv.cross.libc == "msvcrt" then windows.mingw_w64_headers
47574757 else if stdenv.cross.libc == "libSystem" then darwin.xcode
47584758 else null;
47594759 in wrapGCCCross {
47604760 gcc = forcedNativePackages.gcc.cc.override {
4761− cross = crossSystem;
4761+ cross = targetPlatform;
47624762 crossStageStatic = true;
47634763 langCC = false;
47644764 libcCross = libcCross1;
@@ -4768,31 +4768,31 @@ with pkgs;
47684768 };
47694769 libc = libcCross1;
47704770 binutils = binutilsCross;
4771− cross = crossSystem;
4771+ cross = targetPlatform;
47724772 };
47734773
47744774 # Only needed for mingw builds
4775− gccCrossMingw2 = assert crossSystem != null; wrapGCCCross {
4775+ gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapGCCCross {
47764776 gcc = gccCrossStageStatic.gcc;
47774777 libc = windows.mingw_headers2;
47784778 binutils = binutilsCross;
4779− cross = assert crossSystem != null; crossSystem;
4779+ cross = targetPlatform;
47804780 };
47814781
4782− gccCrossStageFinal = assert crossSystem != null; wrapGCCCross {
4782+ gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapGCCCross {
47834783 gcc = forcedNativePackages.gcc.cc.override {
4784− cross = crossSystem;
4784+ cross = targetPlatform;
47854785 crossStageStatic = false;
47864786
47874787 # XXX: We have troubles cross-compiling libstdc++ on MinGW (see
47884788 # <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";
47904790 # Why is this needed?
47914791 inherit (forcedNativePackages) binutilsCross;
47924792 };
47934793 libc = libcCross;
47944794 binutils = binutilsCross;
4795− cross = crossSystem;
4795+ cross = targetPlatform;
47964796 };
47974797
47984798 gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 {
@@ -4810,7 +4810,7 @@ with pkgs;
48104810 # and host != build), `cross' must be null but the cross-libc must still
48114811 # be passed.
48124812 cross = null;
4813− libcCross = if crossSystem != null then libcCross else null;
4813+ libcCross = if targetPlatform != buildPlatform then libcCross else null;
48144814 }));
48154815
48164816 gcc48 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.8 {
@@ -4823,7 +4823,7 @@ with pkgs;
48234823 # and host != build), `cross' must be null but the cross-libc must still
48244824 # be passed.
48254825 cross = null;
4826− libcCross = if crossSystem != null then libcCross else null;
4826+ libcCross = if targetPlatform != buildPlatform then libcCross else null;
48274827
48284828 isl = if !stdenv.isDarwin then isl_0_14 else null;
48294829 cloog = if !stdenv.isDarwin then cloog else null;
@@ -4840,7 +4840,7 @@ with pkgs;
48404840 # and host != build), `cross' must be null but the cross-libc must still
48414841 # be passed.
48424842 cross = null;
4843− libcCross = if crossSystem != null then libcCross else null;
4843+ libcCross = if targetPlatform != buildPlatform then libcCross else null;
48444844
48454845 isl = if !stdenv.isDarwin then isl_0_11 else null;
48464846
@@ -4857,7 +4857,7 @@ with pkgs;
48574857 # and host != build), `cross' must be null but the cross-libc must still
48584858 # be passed.
48594859 cross = null;
4860− libcCross = if crossSystem != null then libcCross else null;
4860+ libcCross = if targetPlatform != buildPlatform then libcCross else null;
48614861
48624862 isl = if !stdenv.isDarwin then isl_0_14 else null;
48634863 }));
@@ -4872,7 +4872,7 @@ with pkgs;
48724872 # and host != build), `cross' must be null but the cross-libc must still
48734873 # be passed.
48744874 cross = null;
4875− libcCross = if crossSystem != null then libcCross else null;
4875+ libcCross = if targetPlatform != buildPlatform then libcCross else null;
48764876
48774877 isl = if !stdenv.isDarwin then isl_0_14 else null;
48784878 }));
@@ -5005,7 +5005,7 @@ with pkgs;
50055005
50065006 # Haskell and GHC
50075007
5008− haskell = callPackage ./haskell-packages.nix { inherit crossSystem; };
5008+ haskell = callPackage ./haskell-packages.nix { };
50095009
50105010 haskellPackages = haskell.packages.ghc801.override {
50115011 overrides = config.haskellPackageOverrides or (self: super: {});
@@ -6068,11 +6068,11 @@ with pkgs;
60686068 gold = false;
60696069 });
60706070
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
60736073 else forcedNativePackages.binutils.override {
60746074 noSysDirs = true;
6075− cross = crossSystem;
6075+ cross = targetPlatform;
60766076 });
60776077
60786078 bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { };
@@ -6718,7 +6718,7 @@ with pkgs;
67186718 gdbGuile = lowPrio (gdb.override { inherit guile; });
67196719
67206720 gdbCross = lowPrio (callPackage ../development/tools/misc/gdb {
6721− target = crossSystem;
6721+ target = if targetPlatform != buildPlatform then targetPlatform else null;
67226722 });
67236723
67246724 gdb-multitarget = lowPrio (gdb.override { multitarget = true; });
@@ -7332,7 +7332,7 @@ with pkgs;
73327332 else if name == "libSystem" then darwin.xcode
73337333 else throw "Unknown libc";
73347334
7335− libcCross = assert crossSystem != null; libcCrossChooser crossSystem.libc;
7335+ libcCross = assert targetPlatform != buildPlatform; libcCrossChooser targetPlatform.libc;
73367336
73377337 # Only supported on Linux
73387338 glibcLocales = if stdenv.isLinux then callPackage ../development/libraries/glibc/locales.nix { } else null;
@@ -10895,7 +10895,7 @@ with pkgs;
1089510895 apple-source-releases = callPackage ../os-specific/darwin/apple-source-releases { };
1089610896 in apple-source-releases // rec {
1089710897 cctools_cross = callPackage (forcedNativePackages.callPackage ../os-specific/darwin/cctools/port.nix {}).cross {
10898− cross = assert crossSystem != null; crossSystem;
10898+ cross = assert targetPlatform != buildPlatform; targetPlatform;
1089910899 inherit maloader;
1090010900 xctoolchain = xcode.toolchain;
1090110901 };
@@ -10968,7 +10968,7 @@ with pkgs;
1096810968 libossp_uuid = callPackage ../development/libraries/libossp-uuid { };
1096910969
1097010970 libuuid =
10971− if crossSystem != null && crossSystem.config == "i586-pc-gnu"
10971+ if targetPlatform != buildPlatform && targetPlatform.config == "i586-pc-gnu"
1097210972 then (utillinuxMinimal // {
1097310973 crossDrv = lib.overrideDerivation utillinuxMinimal.crossDrv (args: {
1097410974 # `libblkid' fails to build on GNU/Hurd.
@@ -11053,7 +11053,7 @@ with pkgs;
1105311053
1105411054 # GNU/Hurd core packages.
1105511055 gnu = recurseIntoAttrs (callPackage ../os-specific/gnu {
11056− inherit platform crossSystem;
11056+ inherit platform;
1105711057 });
1105811058
1105911059 hwdata = callPackage ../os-specific/linux/hwdata { };
@@ -11133,11 +11133,11 @@ with pkgs;
1113311133 linuxHeaders = linuxHeaders_4_4;
1113411134
1113511135 linuxHeaders24Cross = forcedNativePackages.callPackage ../os-specific/linux/kernel-headers/2.4.nix {
11136− cross = assert crossSystem != null; crossSystem;
11136+ cross = assert targetPlatform != buildPlatform; targetPlatform;
1113711137 };
1113811138
1113911139 linuxHeaders26Cross = forcedNativePackages.callPackage ../os-specific/linux/kernel-headers/4.4.nix {
11140− cross = assert crossSystem != null; crossSystem;
11140+ cross = assert targetPlatform != buildPlatform; targetPlatform;
1114111141 };
1114211142
1114311143 linuxHeaders_3_18 = callPackage ../os-specific/linux/kernel-headers/3.18.nix { };
@@ -11149,8 +11149,8 @@ with pkgs;
1114911149 else if ver == "2.6" then linuxHeaders26Cross
1115011150 else throw "Unknown linux kernel version";
1115111151
11152− linuxHeadersCross = assert crossSystem != null;
11153− linuxHeadersCrossChooser crossSystem.platform.kernelMajor;
11152+ linuxHeadersCross = assert targetPlatform != buildPlatform;
11153+ linuxHeadersCrossChooser targetPlatform.platform.kernelMajor;
1115411154
1115511155 kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { };
1115611156
@@ -11812,7 +11812,7 @@ with pkgs;
1181211812 uclibcCross = lowPrio (callPackage ../os-specific/linux/uclibc {
1181311813 linuxHeaders = linuxHeadersCross;
1181411814 gccCross = gccCrossStageStatic;
11815− cross = assert crossSystem != null; crossSystem;
11815+ cross = assert targetPlatform != buildPlatform; targetPlatform;
1181611816 });
1181711817
1181811818 udev = systemd;
pkgs/top-level/haskell-packages.nix+2−2
@@ -1,4 +1,4 @@
1−{ pkgs, callPackage, stdenv, crossSystem }:
1+{ pkgs, callPackage, stdenv, buildPlatform, targetPlatform }:
22
33rec {
44
@@ -55,7 +55,7 @@ rec {
5555 ghcHEAD = callPackage ../development/compilers/ghc/head.nix rec {
5656 bootPkgs = packages.ghc7103;
5757 inherit (bootPkgs) alex happy;
58− inherit crossSystem;
58+ inherit buildPlatform targetPlatform;
5959 selfPkgs = packages.ghcHEAD;
6060 };
6161 ghcjs = packages.ghc7103.callPackage ../development/compilers/ghcjs {
pkgs/top-level/stage.nix−1
@@ -101,7 +101,6 @@ let
101101 cross = targetPlatform;
102102 };
103103 inherit (buildPlatform) system platform;
104− crossSystem = if targetPlatform != buildPlatform then targetPlatform else null;
105104 };
106105
107106 splice = self: super: import ./splice.nix lib self;