diff --git a/pkgs/development/python-modules/xkcdpass/default.nix b/pkgs/development/python-modules/xkcdpass/default.nix index f74332e53649..5aac18d21077 100644 --- a/pkgs/development/python-modules/xkcdpass/default.nix +++ b/pkgs/development/python-modules/xkcdpass/default.nix @@ -1,24 +1,40 @@ { lib , buildPythonPackage , fetchPypi -, pytestCheckHook , installShellFiles +, pytestCheckHook +, pythonAtLeast +, pythonOlder }: buildPythonPackage rec { pname = "xkcdpass"; version = "1.19.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "c5a2e948746da6fe504e8404284f457d8e98da6df5047c6bb3f71b18882e9d2a"; + hash = "sha256-xaLpSHRtpv5QToQEKE9FfY6Y2m31BHxrs/cbGIgunSo="; }; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + ]; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ + pytestCheckHook + ]; - pythonImportsCheck = [ "xkcdpass" ]; + pythonImportsCheck = [ + "xkcdpass" + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.10") [ + # https://github.com/redacted/XKCD-password-generator/issues/138 + "test_entropy_printout_valid_input" + ]; postInstall = '' installManPage *.? @@ -27,7 +43,7 @@ buildPythonPackage rec { meta = with lib; { description = "Generate secure multiword passwords/passphrases, inspired by XKCD"; - homepage = "https://pypi.python.org/pypi/xkcdpass/"; + homepage = "https://github.com/redacted/XKCD-password-generator"; license = licenses.bsd3; maintainers = with maintainers; [ peterhoeg ]; };