1{ stdenv, fetchFromGitHub }:
2
3stdenv.mkDerivation rec {
4 name = "mkpasswd-${version}";
5
6 version = "5.1.1";
7
8 src = fetchFromGitHub {
9 owner = "rfc1036";
10 repo = "whois";
11 rev = "v${version}";
12 sha256 = "026x8byx8pcpkdxca64368p0nlspk4phw18jg4p04di6cg6nc1m5";
13 };
14
15 preConfigure = ''
16 substituteInPlace Makefile --replace "prefix = /usr" "prefix = $out"
17 '';
18
19 buildPhase = "make mkpasswd";
20
21 installPhase = "make install-mkpasswd";
22
23 meta = with stdenv.lib; {
24 homepage = http://packages.qa.debian.org/w/whois.html;
25 description = "Overfeatured front-end to crypt, from the Debian whois package";
26 license = licenses.gpl2;
27 maintainers = [ maintainers.cstrahan ];
28 platforms = platforms.linux;
29 };
30}