2019-03-04 05:50:37 +00:00
|
|
|
let version = "2.9.7"; in
|
|
|
|
{ stdenv, fetchurl, zlib, gettext
|
|
|
|
, wordlists ? [ (fetchurl {
|
|
|
|
url = "https://github.com/cracklib/cracklib/releases/download/v${version}/cracklib-words-${version}.gz";
|
|
|
|
sha256 = "12fk8w06q628v754l357cf8kfjna98wj09qybpqr892az3x4a33z";
|
|
|
|
}) ]
|
|
|
|
}:
|
2005-10-25 13:54:52 +00:00
|
|
|
|
2009-02-18 11:40:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-03-04 04:37:13 +00:00
|
|
|
pname = "cracklib";
|
2019-03-04 05:50:37 +00:00
|
|
|
inherit version;
|
2009-02-18 11:40:32 +00:00
|
|
|
|
2005-10-25 13:54:52 +00:00
|
|
|
src = fetchurl {
|
2019-03-04 04:37:13 +00:00
|
|
|
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
|
|
|
|
sha256 = "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py";
|
2005-10-25 13:54:52 +00:00
|
|
|
};
|
2009-02-18 11:40:32 +00:00
|
|
|
|
2018-03-14 19:15:06 +00:00
|
|
|
buildInputs = [ zlib gettext ];
|
2013-07-03 12:00:52 +00:00
|
|
|
|
2019-03-04 05:17:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x util/cracklib-format
|
|
|
|
patchShebangs util
|
2019-03-04 05:50:37 +00:00
|
|
|
|
|
|
|
ln -vs ${toString wordlists} dicts/
|
2019-03-04 05:17:20 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
make dict
|
|
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckTarget = "test";
|
|
|
|
|
2013-07-03 12:00:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
2015-11-11 12:41:15 +00:00
|
|
|
homepage = https://github.com/cracklib/cracklib;
|
2009-02-18 11:40:32 +00:00
|
|
|
description = "A library for checking the strength of passwords";
|
2018-08-15 18:17:54 +00:00
|
|
|
license = licenses.lgpl21; # Different license for the wordlist: http://www.openwall.com/wordlists
|
2013-07-03 12:00:52 +00:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2009-02-18 11:40:32 +00:00
|
|
|
};
|
2005-10-25 13:54:52 +00:00
|
|
|
}
|