Skip to content

Commit

Permalink
Cross-compile zlib for Windows
Browse files Browse the repository at this point in the history
svn path=/nixpkgs/trunk/; revision=26928
  • Loading branch information
urkud committed Apr 23, 2011
1 parent 9d87a30 commit 0bfc84b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/development/libraries/zlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0bfc84b

Please sign in to comment.