nixpkgs/pkgs/development/libraries/cracklib/default.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

let version = "2.9.7"; in
2019-04-18 00:25:40 +00:00
{ stdenv, lib, buildPackages, fetchurl, zlib, gettext
, wordlists ? [ (fetchurl {
url = "https://github.com/cracklib/cracklib/releases/download/v${version}/cracklib-words-${version}.gz";
sha256 = "12fk8w06q628v754l357cf8kfjna98wj09qybpqr892az3x4a33z";
}) ]
}:
stdenv.mkDerivation rec {
pname = "cracklib";
inherit version;
src = fetchurl {
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
sha256 = "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py";
};
2019-04-18 00:25:40 +00:00
nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.cracklib;
2018-03-14 19:15:06 +00:00
buildInputs = [ zlib gettext ];
postPatch = ''
chmod +x util/cracklib-format
patchShebangs util
ln -vs ${toString wordlists} dicts/
'';
postInstall = ''
2019-04-18 00:25:40 +00:00
make dict-local
'';
doInstallCheck = true;
installCheckTarget = "test";
2019-04-18 00:25:40 +00:00
meta = with lib; {
2015-11-11 12:41:15 +00:00
homepage = https://github.com/cracklib/cracklib;
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
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.unix;
};
}