Merge pull request #265789 from frogamic/auto-update/pynitrokey

pynitrokey: 0.4.40 -> 0.4.42
This commit is contained in:
Weijia Wang 2023-12-04 02:01:21 +01:00 committed by GitHub
commit d39479ec82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 105 additions and 27 deletions

View File

@ -0,0 +1,51 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonRelaxDepsHook
, flit-core
, certifi
, cryptography
, python-dateutil
, typing-extensions
, urllib3
}:
let
pname = "nethsm";
version = "1.0.0";
in
buildPythonPackage {
inherit pname version;
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-sENuSdA4pYt8v2w2RvDkcQLYCP9V0vZOdWOlkNBi3/o=";
};
propagatedBuildInputs = [
certifi
cryptography
python-dateutil
typing-extensions
urllib3
];
nativeBuildInputs = [
flit-core
pythonRelaxDepsHook
];
pythonRelaxDeps = true;
pythonImportsCheck = [ "nethsm" ];
meta = with lib; {
description = "Client-side Python SDK for NetHSM";
homepage = "https://github.com/Nitrokey/nethsm-sdk-py";
changelog = "https://github.com/Nitrokey/nethsm-sdk-py/releases/tag/v${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ frogamic ];
};
}

View File

@ -1,63 +1,82 @@
{ lib
, python3Packages
, buildPythonApplication
, fetchPypi
, nrfutil
, pythonRelaxDepsHook
, installShellFiles
, libnitrokey
, nix-update-script
, flit-core
, certifi
, cffi
, click
, cryptography
, ecdsa
, fido2
, intelhex
, nkdfu
, python-dateutil
, pyusb
, requests
, spsdk
, tqdm
, tlv8
, typing-extensions
, pyserial
, protobuf
, click-aliases
, semver
, nethsm
, importlib-metadata
}:
with python3Packages;
buildPythonApplication rec {
let
pname = "pynitrokey";
version = "0.4.40";
format = "pyproject";
version = "0.4.42";
mainProgram = "nitropy";
in
buildPythonApplication {
inherit pname version;
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-Hu+8UooDzv4GhkWt0sCckQQyHjWn4V/zt2ADlVCoHmk=";
hash = "sha256-KLUuMTGiPqm2C3+TWS7nBNZAq+rGxAL/mMaT94SkYWY=";
};
propagatedBuildInputs = [
certifi
cffi
click
click-aliases
cryptography
ecdsa
frozendict
fido2
intelhex
nkdfu
nrfutil
python-dateutil
pyusb
requests
semver
spsdk
tqdm
urllib3
tlv8
typing-extensions
pyserial
protobuf
click-aliases
semver
nethsm
importlib-metadata
];
nativeBuildInputs = [
flit-core
installShellFiles
pythonRelaxDepsHook
];
# FIXME: does pythonRelaxDepsHook not work for pypaBuildHook + flit-core?
pypaBuildFlags = [ "--skip-dependency-check" ];
pythonRelaxDeps = true;
pythonRelaxDeps = [
"click"
"cryptography"
"protobuf"
"python-dateutil"
"spsdk"
"typing_extensions"
];
# pythonRelaxDepsHook runs in postBuild so cannot be used
pypaBuildFlags = [ "--skip-dependency-check" ];
# libnitrokey is not propagated to users of the pynitrokey Python package.
# It is only usable from the wrapped bin/nitropy
@ -70,13 +89,19 @@ buildPythonApplication rec {
pythonImportsCheck = [ "pynitrokey" ];
passthru.updateScript = nix-update-script { };
postInstall = ''
installShellCompletion --cmd ${mainProgram} \
--bash <(_NITROPY_COMPLETE=bash_source $out/bin/${mainProgram}) \
--zsh <(_NITROPY_COMPLETE=zsh_source $out/bin/${mainProgram}) \
--fish <(_NITROPY_COMPLETE=fish_source $out/bin/${mainProgram})
'';
meta = with lib; {
description = "Python client for Nitrokey devices";
homepage = "https://github.com/Nitrokey/pynitrokey";
changelog = "https://github.com/Nitrokey/pynitrokey/releases/tag/v${version}";
license = with licenses; [ asl20 mit ];
maintainers = with maintainers; [ frogamic ];
mainProgram = "nitropy";
inherit mainProgram;
};
}

View File

@ -41736,7 +41736,7 @@ with pkgs;
xrq = callPackage ../applications/misc/xrq { };
pynitrokey = callPackage ../tools/security/pynitrokey { };
pynitrokey = python3Packages.callPackage ../tools/security/pynitrokey { };
nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { };

View File

@ -8142,6 +8142,8 @@ self: super: with self; {
netdisco = callPackage ../development/python-modules/netdisco { };
nethsm = callPackage ../development/python-modules/nethsm { };
netifaces = callPackage ../development/python-modules/netifaces { };
netmiko = callPackage ../development/python-modules/netmiko { };