From 0bfc84b0aa40741e404e21677730b77ba85f0fb7 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Sat, 23 Apr 2011 06:59:04 +0000 Subject: [PATCH] Cross-compile zlib for Windows svn path=/nixpkgs/trunk/; revision=26928 --- pkgs/development/libraries/zlib/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index a4a91960c0bc0d6..f1b8a006ecfd3a2 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -19,7 +19,15 @@ stdenv.mkDerivation (rec { crossAttrs = { dontStrip = if static then true else false; - }; + } // (if stdenv.cross.libc == "msvcrt" then { + configurePhase='' + installFlags="BINARY_PATH=$out/bin INCLUDE_PATH=$out/include LIBRARY_PATH=$out/lib" + ''; + makeFlags = [ + "-f" "win32/Makefile.gcc" + "PREFIX=${stdenv.cross.config}-" + ] ++ (if static then [] else [ "SHARED_MODE=1" ]); + } else {}); # zlib doesn't like the automatic --disable-shared from the Cygwin stdenv. cygwinConfigureEnableShared = true;