libpng 12: Don't use stdenv ? cross

This commit is contained in:
hsloan 2017-06-28 16:20:55 -04:00 committed by John Ericson
parent a9c90df12e
commit bdbdb08eef

View File

@ -1,6 +1,8 @@
{ stdenv, fetchurl, zlib }:
{ stdenv, fetchurl, zlib
, buildPlatform, hostPlatform
}:
assert !(stdenv ? cross) -> zlib != null;
assert hostPlatform == buildPlatform -> zlib != null;
stdenv.mkDerivation rec {
name = "libpng-1.2.57";
@ -16,7 +18,7 @@ stdenv.mkDerivation rec {
passthru = { inherit zlib; };
crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
crossAttrs = stdenv.lib.optionalAttrs (hostPlatform.libc == "libSystem") {
propagatedBuildInputs = [];
passthru = {};
};