From 8ca8293dbc5982684d0ce87babf3daf7729e549a Mon Sep 17 00:00:00 2001
From: John Ericson <Ericson2314@Yahoo.com>
Date: Fri, 10 Feb 2017 23:48:28 -0500
Subject: [PATCH] libxml2: Don't use stdenv.cross

---
 pkgs/development/libraries/libxml2/default.nix | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix
index fb397ace7941..10dd4ee5dbe4 100644
--- a/pkgs/development/libraries/libxml2/default.nix
+++ b/pkgs/development/libraries/libxml2/default.nix
@@ -1,7 +1,9 @@
 { stdenv, lib, fetchurl, fetchpatch
 , zlib, xz, python2, findXMLCatalogs, libiconv
-, pythonSupport ? (! stdenv ? cross)
-, icuSupport ? false, icu ? null }:
+, buildPlatform, hostPlatform
+, pythonSupport ? buildPlatform == hostPlatform
+, icuSupport ? false, icu ? null
+}:
 
 let
   python = python2;
@@ -45,7 +47,7 @@ in stdenv.mkDerivation rec {
 
   doCheck = !stdenv.isDarwin;
 
-  crossAttrs = lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
+  crossAttrs = lib.optionalAttrs (hostPlatform.libc == "msvcrt") {
     # creating the DLL is broken ATM
     dontDisableStatic = true;
     configureFlags = configureFlags ++ [ "--disable-shared" ];