1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00

zlib: cc-wrapper can be relied on to export this env var

This commit is contained in:
John Ericson 2017-06-28 14:23:59 -04:00
parent 895c361480
commit da668f66c7

View file

@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
crossAttrs = {
dontStrip = static;
configurePlatforms = [];
} // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
} // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") {
installFlags = [
"BINARY_PATH=$(out)/bin"
"INCLUDE_PATH=$(dev)/include"
@ -68,14 +68,12 @@ stdenv.mkDerivation rec {
];
makeFlags = [
"-f" "win32/Makefile.gcc"
"PREFIX=${stdenv.cross.config}-"
"PREFIX=${stdenv.cc.prefix}"
] ++ stdenv.lib.optional (!static) "SHARED_MODE=1";
# Non-typical naming confuses libtool which then refuses to use zlib's DLL
# in some cases, e.g. when compiling libpng.
postInstall = postInstall + "ln -s zlib1.dll $out/bin/libz.dll";
} // stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
makeFlags = [ "RANLIB=${stdenv.cross.config}-ranlib" ];
};
passthru.version = version;