diff options
author | Peter Hoeg <peter@hoeg.com> | 2021-01-25 15:45:52 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2021-01-27 11:47:43 +0800 |
commit | 6d489a3eb4556735fab0fa4ce84be86e2594ef83 (patch) | |
tree | b3418daf41a192ce79bc78a08c7a6118fdd0da7c /pkgs | |
parent | 652b2d6dba246abd696bc6f2cb8b30032ed4fb56 (diff) |
xkcdpass: py2 -> py3, add manpage and run tests
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/xkcdpass/default.nix | 19 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 15 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/xkcdpass/default.nix b/pkgs/development/python-modules/xkcdpass/default.nix index 280ce5a790a6..e372a843cf84 100644 --- a/pkgs/development/python-modules/xkcdpass/default.nix +++ b/pkgs/development/python-modules/xkcdpass/default.nix @@ -1,6 +1,8 @@ { lib , buildPythonPackage , fetchPypi +, pytestCheckHook +, installShellFiles }: buildPythonPackage rec { @@ -12,14 +14,21 @@ buildPythonPackage rec { sha256 = "0ghsjs5bxl996pap910q9s21nywb26mfpjd92rbfywbnj8f2k2cy"; }; - # No tests included - # https://github.com/redacted/XKCD-password-generator/issues/32 - doCheck = false; + nativeBuildInputs = [ installShellFiles ]; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "xkcdpass" ]; + + postInstall = '' + installManPage *.? + install -Dm444 -t $out/share/doc/${pname} README* + ''; meta = with lib; { - homepage = "https://pypi.python.org/pypi/xkcdpass/"; description = "Generate secure multiword passwords/passphrases, inspired by XKCD"; + homepage = "https://pypi.python.org/pypi/xkcdpass/"; license = licenses.bsd3; + maintainers = with maintainers; [ peterhoeg ]; }; - } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4fd88228462c..7cfc754d3117 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3805,7 +3805,7 @@ in wsl-open = callPackage ../tools/misc/wsl-open { }; - xkcdpass = with pythonPackages; toPythonApplication xkcdpass; + xkcdpass = with python3Packages; toPythonApplication xkcdpass; xob = callPackage ../tools/X11/xob { }; |