From cdaced58aec376965e3e5ee422e098df526e4726 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 12 Mar 2014 06:34:42 +0100 Subject: [PATCH] libpng12/cross: Don't add zlib for Darwin builds. Cross builds for Darwin already include the CoreFoundation and the libraries from XCode, so zlib already exists on that platform. Signed-off-by: aszlig --- pkgs/development/libraries/libpng/12.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libpng/12.nix b/pkgs/development/libraries/libpng/12.nix index 031e2aa1a914..b7fad76acaa3 100644 --- a/pkgs/development/libraries/libpng/12.nix +++ b/pkgs/development/libraries/libpng/12.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, zlib, xz }: -assert zlib != null; +assert !(stdenv ? cross) -> zlib != null; stdenv.mkDerivation rec { name = "libpng-1.2.50"; @@ -16,6 +16,11 @@ stdenv.mkDerivation rec { passthru = { inherit zlib; }; + crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { + propagatedBuildInputs = []; + passthru = {}; + }; + meta = { description = "The official reference implementation for the PNG file format"; homepage = http://www.libpng.org/pub/png/libpng.html;