c7f94ff3ce
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
50 lines
1 KiB
Nix
50 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, installShellFiles
|
|
, pytestCheckHook
|
|
, pythonAtLeast
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "xkcdpass";
|
|
version = "1.19.4";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-KTXVS0gtGby1Rla9oBy77J7kH/1C0jWlJwX9lcq3D9c=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"xkcdpass"
|
|
];
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
|
# https://github.com/redacted/XKCD-password-generator/issues/138
|
|
"test_entropy_printout_valid_input"
|
|
];
|
|
|
|
postInstall = ''
|
|
installManPage *.?
|
|
install -Dm444 -t $out/share/doc/${pname} README*
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Generate secure multiword passwords/passphrases, inspired by XKCD";
|
|
homepage = "https://github.com/redacted/XKCD-password-generator";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
};
|
|
}
|