depot/third_party/nixpkgs/pkgs/development/python-modules/xkcdpass/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

50 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, installShellFiles
, pytestCheckHook
, pythonAtLeast
, pythonOlder
}:
buildPythonPackage rec {
pname = "xkcdpass";
version = "1.19.5";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-zEgC3tTQ6kwDovHPHRTvYndWVF79DpnAX454VDZiedE=";
};
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 ];
};
}