diff --git a/pkgs/tools/networking/whois/default.nix b/pkgs/tools/networking/whois/default.nix index bbee69e0c91b..30ecf617873a 100644 --- a/pkgs/tools/networking/whois/default.nix +++ b/pkgs/tools/networking/whois/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, perl, gettext, pkgconfig, libidn2 }: +{ stdenv, fetchFromGitHub, perl, gettext, pkgconfig, libidn2, libiconv }: stdenv.mkDerivation rec { version = "5.2.20"; @@ -12,17 +12,20 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ perl gettext pkgconfig ]; - buildInputs = [ libidn2 ]; + buildInputs = [ libidn2 libiconv ]; preConfigure = '' for i in Makefile po/Makefile; do substituteInPlace $i --replace "prefix = /usr" "prefix = $out" done + + substituteInPlace Makefile --replace "DEFS += HAVE_ICONV" "DEFS += HAVE_ICONV\nwhois_LDADD += -liconv" ''; - buildPhase = "make whois"; + makeFlags = [ "HAVE_ICONV=1" ]; + buildFlags = [ "whois" ]; - installPhase = "make install-whois"; + installTargets = [ "install-whois" ]; meta = with stdenv.lib; { description = "Intelligent WHOIS client from Debian";