Merge pull request #56805 from dtzWill/update/cracklib-2.9.7
cracklib: 2.9.6 -> 2.9.7, generate dictionary from wordlists
This commit is contained in:
commit
79b3d1b33d
1 changed files with 24 additions and 4 deletions
|
@ -1,15 +1,35 @@
|
|||
{ stdenv, fetchurl, zlib, gettext }:
|
||||
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";
|
||||
}) ]
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cracklib-2.9.6";
|
||||
pname = "cracklib";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/cracklib/cracklib/releases/download/${name}/${name}.tar.gz";
|
||||
sha256 = "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp";
|
||||
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib gettext ];
|
||||
|
||||
postPatch = ''
|
||||
chmod +x util/cracklib-format
|
||||
patchShebangs util
|
||||
|
||||
ln -vs ${toString wordlists} dicts/
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
make dict
|
||||
'';
|
||||
doInstallCheck = true;
|
||||
installCheckTarget = "test";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/cracklib/cracklib;
|
||||
description = "A library for checking the strength of passwords";
|
||||
|
|
Loading…
Reference in a new issue