whois: prefer not overwriting phases, use libiconv

This commit is contained in:
Will Dietz 2018-01-09 08:38:43 -06:00
parent 364b21925f
commit eb7af7a82b

View File

@ -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";