1{ lib 2, buildPythonPackage 3, fetchPypi 4, installShellFiles 5, pytestCheckHook 6, pythonAtLeast 7, pythonOlder 8}: 9 10buildPythonPackage rec { 11 pname = "xkcdpass"; 12 version = "1.19.3"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchPypi { 18 inherit pname version; 19 hash = "sha256-xaLpSHRtpv5QToQEKE9FfY6Y2m31BHxrs/cbGIgunSo="; 20 }; 21 22 nativeBuildInputs = [ 23 installShellFiles 24 ]; 25 26 checkInputs = [ 27 pytestCheckHook 28 ]; 29 30 pythonImportsCheck = [ 31 "xkcdpass" 32 ]; 33 34 disabledTests = lib.optionals (pythonAtLeast "3.10") [ 35 # https://github.com/redacted/XKCD-password-generator/issues/138 36 "test_entropy_printout_valid_input" 37 ]; 38 39 postInstall = '' 40 installManPage *.? 41 install -Dm444 -t $out/share/doc/${pname} README* 42 ''; 43 44 meta = with lib; { 45 description = "Generate secure multiword passwords/passphrases, inspired by XKCD"; 46 homepage = "https://github.com/redacted/XKCD-password-generator"; 47 license = licenses.bsd3; 48 maintainers = with maintainers; [ peterhoeg ]; 49 }; 50}