Author: urkud
Date: Sat Apr 23 06:59:04 2011
New Revision: 26928
URL: https://svn.nixos.org/websvn/nix/?rev=26928&sc=1

Log:
Cross-compile zlib for Windows

Modified:
   nixpkgs/trunk/pkgs/development/libraries/zlib/default.nix

Modified: nixpkgs/trunk/pkgs/development/libraries/zlib/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/zlib/default.nix   Sat Apr 23 
06:58:57 2011        (r26927)
+++ nixpkgs/trunk/pkgs/development/libraries/zlib/default.nix   Sat Apr 23 
06:59:04 2011        (r26928)
@@ -19,7 +19,15 @@
 
   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;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to