2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-02-05 17:12:51 +00:00
|
|
|
, installShellFiles
|
2022-03-05 16:20:37 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xkcdpass";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "1.19.3";
|
2022-03-05 16:20:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-05 16:20:37 +00:00
|
|
|
hash = "sha256-xaLpSHRtpv5QToQEKE9FfY6Y2m31BHxrs/cbGIgunSo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-05 16:20:37 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"xkcdpass"
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# https://github.com/redacted/XKCD-password-generator/issues/138
|
|
|
|
"test_entropy_printout_valid_input"
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage *.?
|
|
|
|
install -Dm444 -t $out/share/doc/${pname} README*
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Generate secure multiword passwords/passphrases, inspired by XKCD";
|
2022-03-05 16:20:37 +00:00
|
|
|
homepage = "https://github.com/redacted/XKCD-password-generator";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|