diff options
| author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-06-15 01:06:07 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-15 01:06:07 +0300 |
| commit | 75eb7c2d47fdc01a0d477e9a89eac7ed366fe898 (patch) | |
| tree | 99d506169336873205e659d6464e4b6e4d35fbce | |
| parent | Merge pull request #237768 from NixOS/backport-236502-to-release-23.05 (diff) | |
| parent | pynitrokey: 0.4.37 -> 0.4.38 (diff) | |
| download | nixpkgs-75eb7c2d47fdc01a0d477e9a89eac7ed366fe898.tar.gz | |
Merge pull request #237783 from panicgh/pynitrokey
[23.05] pynitrokey: 0.4.37 -> 0.4.38, python3Packages.click-aliases: init at 1.0.1
4 files changed, 94 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/click-aliases/0001-Fix-quotes-in-test.patch b/pkgs/development/python-modules/click-aliases/0001-Fix-quotes-in-test.patch new file mode 100644 index 000000000000..13cc6a68e8d3 --- /dev/null +++ b/pkgs/development/python-modules/click-aliases/0001-Fix-quotes-in-test.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nicolas Benes <nbenes.gh@xandea.de> +Date: Mon, 12 Jun 2023 11:29:32 +0200 +Subject: [PATCH] Fix quotes in test + + +diff --git a/tests/test_basic.py b/tests/test_basic.py +index 077e6c0..90bbdc3 100644 +--- a/tests/test_basic.py ++++ b/tests/test_basic.py +@@ -43,8 +43,8 @@ def test_foobar(runner): + + TEST_INVALID = """Usage: cli [OPTIONS] COMMAND [ARGS]... + {} +-Error: No such command "bar". +-""".format('Try "cli --help" for help.\n' if _click7 else '') ++Error: No such command 'bar'. ++""".format("Try 'cli --help' for help.\n" if _click7 else '') + + + def test_invalid(runner): +diff --git a/tests/test_foobar.py b/tests/test_foobar.py +index fd6c4e6..ab0ad5d 100644 +--- a/tests/test_foobar.py ++++ b/tests/test_foobar.py +@@ -44,8 +44,8 @@ def test_foobar(runner): + + TEST_INVALID = """Usage: cli [OPTIONS] COMMAND [ARGS]... + {} +-Error: No such command "baz". +-""".format('Try "cli --help" for help.\n' if _click7 else '') ++Error: No such command 'baz'. ++""".format("Try 'cli --help' for help.\n" if _click7 else '') + + + def test_invalid(runner): +-- +2.40.1 + diff --git a/pkgs/development/python-modules/click-aliases/default.nix b/pkgs/development/python-modules/click-aliases/default.nix new file mode 100644 index 000000000000..677cb1309fd7 --- /dev/null +++ b/pkgs/development/python-modules/click-aliases/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, click +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "click-aliases"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "click-contrib"; + repo = "click-aliases"; + rev = "v${version}"; + hash = "sha256-vzWlCb4m9TdRaVz4DrlRRZ60+9gj60NoiALgvaIG0gA="; + }; + + patches = [ + ./0001-Fix-quotes-in-test.patch + ]; + + propagatedBuildInputs = [ + click + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "click_aliases" ]; + + meta = with lib; { + homepage = "https://github.com/click-contrib/click-aliases"; + description = "Enable aliases for click"; + license = licenses.mit; + maintainers = with maintainers; [ panicgh ]; + }; +} diff --git a/pkgs/tools/security/pynitrokey/default.nix b/pkgs/tools/security/pynitrokey/default.nix index 6727101d3fe7..ccf30f000ed5 100644 --- a/pkgs/tools/security/pynitrokey/default.nix +++ b/pkgs/tools/security/pynitrokey/default.nix @@ -1,21 +1,28 @@ -{ python3Packages, lib, nrfutil, libnitrokey }: +{ lib +, python3Packages +, fetchPypi +, nrfutil +, libnitrokey +, nix-update-script +}: with python3Packages; buildPythonApplication rec { pname = "pynitrokey"; - version = "0.4.37"; + version = "0.4.38"; format = "flit"; src = fetchPypi { inherit pname version; - hash = "sha256-KoZym1b+E0P3kRt0PTm9wCX4nO31isDIwEq38xMgDDU="; + hash = "sha256-8TMDbkRyTkzULrBeO0SL/WXB240LD/iZLigE/zPum2A="; }; propagatedBuildInputs = [ certifi cffi click + click-aliases cryptography ecdsa frozendict @@ -26,6 +33,7 @@ buildPythonApplication rec { python-dateutil pyusb requests + semver spsdk tqdm urllib3 @@ -45,7 +53,7 @@ buildPythonApplication rec { "typing_extensions" ]; - # libnitrokey is not propagated to users of pynitrokey + # libnitrokey is not propagated to users of the pynitrokey Python package. # It is only usable from the wrapped bin/nitropy makeWrapperArgs = [ "--set LIBNK_PATH ${lib.makeLibraryPath [ libnitrokey ]}" @@ -56,6 +64,8 @@ buildPythonApplication rec { pythonImportsCheck = [ "pynitrokey" ]; + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "Python client for Nitrokey devices"; homepage = "https://github.com/Nitrokey/pynitrokey"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4f35925d5617..5fb41539a55a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1857,6 +1857,8 @@ self: super: with self; { clickclick = callPackage ../development/python-modules/clickclick { }; + click-aliases = callPackage ../development/python-modules/click-aliases { }; + click-command-tree = callPackage ../development/python-modules/click-command-tree { }; click-completion = callPackage ../development/python-modules/click-completion { }; |
