Merge pull request #33650 from dtzWill/feature/whois-idn-and-update

whois: use idn, libiconv; update
This commit is contained in:
Jörg Thalheim 2018-01-13 18:55:17 +00:00 committed by GitHub
commit 9e40faf0d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,27 +1,31 @@
{ stdenv, fetchFromGitHub, perl, gettext }: { stdenv, fetchFromGitHub, perl, gettext, pkgconfig, libidn2, libiconv }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "5.2.18"; version = "5.2.20";
name = "whois-${version}"; name = "whois-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "rfc1036"; owner = "rfc1036";
repo = "whois"; repo = "whois";
rev = "v${version}"; rev = "v${version}";
sha256 = "0jzyq1rj6balc6a28swzgspv55xhkc75dw6wsn159in4ap61bzmi"; sha256 = "1aamasivfnghr9my1j6c1rf0dfal45axjcjf3mpv0g942bkxqp5b";
}; };
buildInputs = [ perl gettext ]; nativeBuildInputs = [ perl gettext pkgconfig ];
buildInputs = [ libidn2 libiconv ];
preConfigure = '' preConfigure = ''
for i in Makefile po/Makefile; do for i in Makefile po/Makefile; do
substituteInPlace $i --replace "prefix = /usr" "prefix = $out" substituteInPlace $i --replace "prefix = /usr" "prefix = $out"
done 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; { meta = with stdenv.lib; {
description = "Intelligent WHOIS client from Debian"; description = "Intelligent WHOIS client from Debian";