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 {
version = "5.2.18";
version = "5.2.20";
name = "whois-${version}";
src = fetchFromGitHub {
owner = "rfc1036";
repo = "whois";
rev = "v${version}";
sha256 = "0jzyq1rj6balc6a28swzgspv55xhkc75dw6wsn159in4ap61bzmi";
sha256 = "1aamasivfnghr9my1j6c1rf0dfal45axjcjf3mpv0g942bkxqp5b";
};
buildInputs = [ perl gettext ];
nativeBuildInputs = [ perl gettext pkgconfig ];
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";