1 let version = "2.9.7"; in
2 { stdenv, lib, buildPackages, fetchurl, zlib, gettext
3 , wordlists ? [ (fetchurl {
4 url = "https://github.com/cracklib/cracklib/releases/download/v${version}/cracklib-words-${version}.gz";
5 sha256 = "12fk8w06q628v754l357cf8kfjna98wj09qybpqr892az3x4a33z";
9 stdenv.mkDerivation rec {
14 url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
15 sha256 = "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py";
18 nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.cracklib;
19 buildInputs = [ zlib gettext ];
21 postPatch = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
22 chmod +x util/cracklib-format
26 ln -vs ${toString wordlists} dicts/
32 doInstallCheck = true;
33 installCheckTarget = "test";
36 homepage = "https://github.com/cracklib/cracklib";
37 description = "A library for checking the strength of passwords";
38 license = licenses.lgpl21; # Different license for the wordlist: http://www.openwall.com/wordlists
39 maintainers = with maintainers; [ lovek323 ];
40 platforms = platforms.unix;