3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #237335 from panicgh/pynitrokey

pynitrokey: 0.4.37 -> 0.4.38, python3Packages.click-aliases: init at 1.0.1
This commit is contained in:
Weijia Wang 2023-06-14 15:30:02 +03:00 committed by GitHub
commit 2f087334af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 94 additions and 4 deletions

View file

@ -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

View file

@ -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 ];
};
}

View file

@ -1,21 +1,28 @@
{ lib, python3Packages, fetchPypi, 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";

View file

@ -1879,6 +1879,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 { };