summary refs log tree commit diff
path: root/pkgs/stdenv/cross
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-24 16:46:52 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-24 20:01:43 -0400
commitb81ee9df9f4724b7c9ac611999758a85cf684cc4 (patch)
tree266983d300c30e3dfb3bd6684a3e244d9d76b963 /pkgs/stdenv/cross
parent839f96a4c5c4e5565239adbdf8a40667056a2652 (diff)
downloadnixpkgs-b81ee9df9f4724b7c9ac611999758a85cf684cc4.tar
nixpkgs-b81ee9df9f4724b7c9ac611999758a85cf684cc4.tar.gz
nixpkgs-b81ee9df9f4724b7c9ac611999758a85cf684cc4.tar.bz2
nixpkgs-b81ee9df9f4724b7c9ac611999758a85cf684cc4.tar.lz
nixpkgs-b81ee9df9f4724b7c9ac611999758a85cf684cc4.tar.xz
nixpkgs-b81ee9df9f4724b7c9ac611999758a85cf684cc4.tar.zst
nixpkgs-b81ee9df9f4724b7c9ac611999758a85cf684cc4.zip
makeStdenvCross: Remove
It is inlined into the cross stdenv, which is its last use-case after
the previous commit.
Diffstat (limited to 'pkgs/stdenv/cross')
-rw-r--r--pkgs/stdenv/cross/default.nix20
1 files changed, 17 insertions, 3 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index ab42dd319a6..29521874d1e 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -34,17 +34,31 @@ in lib.init bootStages ++ [
   (buildPackages: {
     inherit config overlays;
     selfBuild = false;
-    stdenv = buildPackages.makeStdenvCross {
-      inherit (buildPackages) stdenv;
+    stdenv = buildPackages.stdenv.override (old: rec {
       buildPlatform = localSystem;
       hostPlatform = crossSystem;
       targetPlatform = crossSystem;
+
+      # Prior overrides are surely not valid as packages built with this run on
+      # a different platform, and so are disabled.
+      overrides = _: _: {};
+      extraBuildInputs = [ ]; # Old ones run on wrong platform
+
       cc = if crossSystem.useiOSPrebuilt or false
              then buildPackages.darwin.iosSdkPkgs.clang
            else if crossSystem.useAndroidPrebuilt
              then buildPackages.androidenv."androidndkPkgs_${crossSystem.ndkVer}".gcc
            else buildPackages.gcc;
-    };
+
+      extraNativeBuildInputs = old.extraNativeBuildInputs
+           # without proper `file` command, libtool sometimes fails
+           # to recognize 64-bit DLLs
+        ++ lib.optional (hostPlatform.config == "x86_64-w64-mingw32") buildPackages.file
+        ++ lib.optional
+             (hostPlatform.isAarch64 || hostPlatform.isMips || hostPlatform.libc == "musl")
+             buildPackages.updateAutotoolsGnuConfigScriptsHook
+        ;
+    });
   })
 
 ]