diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2011-04-23 06:59:04 +0000 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2011-04-23 06:59:04 +0000 |
commit | 0bfc84b0aa40741e404e21677730b77ba85f0fb7 (patch) | |
tree | afe7b41ba9028f213f96aac209455f65ef61cb4c /pkgs/development/libraries/zlib | |
parent | 9d87a3059d29cb916994dd53aff5ff0fa55755bd (diff) |
Cross-compile zlib for Windows
svn path=/nixpkgs/trunk/; revision=26928
Diffstat (limited to 'pkgs/development/libraries/zlib')
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index a4a91960c0bc0..f1b8a006ecfd3 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; |