@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, perl, gettext, pkgconfig, libidn2 }:
1+{ stdenv, fetchFromGitHub, perl, gettext, pkgconfig, libidn2, libiconv }:
22
33stdenv.mkDerivation rec {
44 version = "5.2.20";
@@ -12,17 +12,20 @@ stdenv.mkDerivation rec {
1212 };
1313
1414 nativeBuildInputs = [ perl gettext pkgconfig ];
15− buildInputs = [ libidn2 ];
15+ buildInputs = [ libidn2 libiconv ];
1616
1717 preConfigure = ''
1818 for i in Makefile po/Makefile; do
1919 substituteInPlace $i --replace "prefix = /usr" "prefix = $out"
2020 done
21+
22+ substituteInPlace Makefile --replace "DEFS += HAVE_ICONV" "DEFS += HAVE_ICONV\nwhois_LDADD += -liconv"
2123 '';
2224
23− buildPhase = "make whois";
25+ makeFlags = [ "HAVE_ICONV=1" ];
26+ buildFlags = [ "whois" ];
2427
25− installPhase = "make install-whois";
28+ installTargets = [ "install-whois" ];
2629
2730 meta = with stdenv.lib; {
2831 description = "Intelligent WHOIS client from Debian";