From 03959d46165f49e6c3629cf1bf2a9ce0f6933de3 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 25 May 2015 00:53:10 +0200 Subject: whois: init at 5.2.10 and share with mkpasswd Close #7979. This commit adds a much more usable whois tool compared to the ones in busybox and inetutils. The sources for whois and mkpasswd from Debian are both located in the whois git repository for historical reasons. --- pkgs/tools/networking/whois/default.nix | 40 ++++++++++++++++++++++++++++++++ pkgs/tools/security/mkpasswd/default.nix | 23 ++++++------------ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 pkgs/tools/networking/whois/default.nix (limited to 'pkgs') diff --git a/pkgs/tools/networking/whois/default.nix b/pkgs/tools/networking/whois/default.nix new file mode 100644 index 000000000000..bab487f5fab8 --- /dev/null +++ b/pkgs/tools/networking/whois/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchFromGitHub, perl, gettext }: + +stdenv.mkDerivation rec { + version = "5.2.10"; + name = "whois-${version}"; + + src = fetchFromGitHub { + owner = "rfc1036"; + repo = "whois"; + rev = "v${version}"; + sha256 = "0fqxbys3ssyplh70wjs83jsljqhmrnjic02ayaznw9m9l6fzhkkr"; + }; + + buildInputs = [ perl gettext ]; + + preConfigure = '' + for i in Makefile po/Makefile; do + substituteInPlace $i --replace "prefix = /usr" "prefix = $out" + done + ''; + + buildPhase = "make whois"; + + installPhase = "make install-whois"; + + meta = with stdenv.lib; { + description = "Intelligent WHOIS client from Debian"; + longDescription = '' + This package provides a commandline client for the WHOIS (RFC 3912) + protocol, which queries online servers for information such as contact + details for domains and IP address assignments. It can intelligently + select the appropriate WHOIS server for most queries. + ''; + + homepage = http://packages.qa.debian.org/w/whois.html; + license = licenses.gpl2; + maintainers = with maintainers; [ fpletz ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/security/mkpasswd/default.nix b/pkgs/tools/security/mkpasswd/default.nix index 8975ca4324d1..88aa71810dcf 100644 --- a/pkgs/tools/security/mkpasswd/default.nix +++ b/pkgs/tools/security/mkpasswd/default.nix @@ -1,30 +1,21 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, whois, perl }: -stdenv.mkDerivation rec { - name = "mkpasswd-${version}"; +stdenv.mkDerivation { + name = "mkpasswd-${whois.version}"; - version = "5.1.1"; + src = whois.src; - src = fetchFromGitHub { - owner = "rfc1036"; - repo = "whois"; - rev = "v${version}"; - sha256 = "026x8byx8pcpkdxca64368p0nlspk4phw18jg4p04di6cg6nc1m5"; - }; - - preConfigure = '' - substituteInPlace Makefile --replace "prefix = /usr" "prefix = $out" - ''; + buildInputs = [ perl ]; + preConfigure = whois.preConfigure; buildPhase = "make mkpasswd"; - installPhase = "make install-mkpasswd"; meta = with stdenv.lib; { homepage = http://packages.qa.debian.org/w/whois.html; description = "Overfeatured front-end to crypt, from the Debian whois package"; license = licenses.gpl2; - maintainers = [ maintainers.cstrahan ]; + maintainers = with maintainers; [ cstrahan fpletz ]; platforms = platforms.linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 82157ba09ef2..a9b6d6c1a819 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3349,6 +3349,8 @@ let welkin = callPackage ../tools/graphics/welkin {}; + whois = callPackage ../tools/networking/whois { }; + wsmancli = callPackage ../tools/system/wsmancli {}; wolfebin = callPackage ../tools/networking/wolfebin { -- cgit 1.4.1