libiconv: fix on mingw

This commit is contained in:
Vladimír Čunát 2016-02-09 15:23:16 +01:00
parent 9ea3e371df
commit a047ba25f4

View File

@ -1,6 +1,6 @@
{ fetchurl, stdenv, lib }:
assert (!stdenv.isLinux);
assert !stdenv.isLinux || stdenv ? cross; # TODO: improve on cross
stdenv.mkDerivation rec {
name = "libiconv-1.14";
@ -15,6 +15,12 @@ stdenv.mkDerivation rec {
./libiconv-1.14-wchar.patch
];
postPatch =
lib.optionalString (stdenv.cross.libc or null == "msvcrt")
''
sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h
'';
configureFlags =
# On Cygwin, Libtool produces a `.dll.a', which is not a "real" DLL
# (Windows' linker would need to be used somehow to produce an actual