zlib: fix cygwin build
commitcbc0db08f948a762ee4b3f7f9ded47a034f5d9fa
authorDavid McFarland <corngood@gmail.com>
dateTue 23 May 2017, 10:36 (10 years ago)
parentc580ab4
pkgs/development/libraries/zlib/default.nix+2
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
1717 sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1";
1818 };
1919
20+ patches = stdenv.lib.optional hostPlatform.isCygwin ./disable-cygwin-widechar.patch;
21+
2022 postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
2123 substituteInPlace configure \
2224 --replace '/usr/bin/libtool' 'ar' \
pkgs/development/libraries/zlib/disable-cygwin-widechar.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/gzguts.h b/gzguts.h
2+index 990a4d2..6378d46 100644
3+--- a/gzguts.h
4++++ b/gzguts.h
5+@@ -39,7 +39,7 @@
6+ # include <io.h>
7+ #endif
8+
9+-#if defined(_WIN32) || defined(__CYGWIN__)
10++#if defined(_WIN32)
11+ # define WIDECHAR
12+ #endif
13+