summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2025-03-23 10:22:00 +0100
committerGitHub <noreply@github.com>2025-03-23 10:22:00 +0100
commit4680c92bc8607a4e14cb80287e9cfc536c6396fe (patch)
treed40765432184e8b4dc75f21329105f0722386817
parentmpvScripts.videoclip: 0-unstable-2024-08-20 -> 0-unstable-2025-03-10 (#390563) (diff)
parentpython313Packages.nethsm: enable tests (diff)
downloadnixpkgs-4680c92bc8607a4e14cb80287e9cfc536c6396fe.tar.gz
python312Packages.nethsm: 1.2.1 -> 1.3.0 (#392245)
-rw-r--r--pkgs/development/python-modules/nethsm/default.nix51
1 files changed, 34 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/nethsm/default.nix b/pkgs/development/python-modules/nethsm/default.nix
index 189bb4aa813b..64ab1608a406 100644
--- a/pkgs/development/python-modules/nethsm/default.nix
+++ b/pkgs/development/python-modules/nethsm/default.nix
@@ -1,30 +1,36 @@
{
lib,
buildPythonPackage,
- fetchPypi,
- flit-core,
certifi,
cryptography,
+ docker,
+ fetchFromGitHub,
+ flit-core,
+ podman,
+ pycryptodome,
+ pytestCheckHook,
python-dateutil,
typing-extensions,
urllib3,
}:
-let
+buildPythonPackage rec {
pname = "nethsm";
- version = "1.2.1";
-in
-
-buildPythonPackage {
- inherit pname version;
+ version = "1.3.0";
pyproject = true;
- src = fetchPypi {
- inherit pname version;
- hash = "sha256-EPxGJFCGGl3p3yLlM7NH7xtEVS2woRigKJhL57A0gAE=";
+ src = fetchFromGitHub {
+ owner = "Nitrokey";
+ repo = "nethsm-sdk-py";
+ tag = "v${version}";
+ hash = "sha256-vH5YjS3VO5krCMVQFcEgDhJeCUzo9EzFnBxq+zPuZ68=";
};
- propagatedBuildInputs = [
+ pythonRelaxDeps = true;
+
+ build-system = [ flit-core ];
+
+ dependencies = [
certifi
cryptography
python-dateutil
@@ -32,19 +38,30 @@ buildPythonPackage {
urllib3
];
- nativeBuildInputs = [
- flit-core
+ nativeCheckInputs = [
+ docker
+ podman
+ pycryptodome
+ pytestCheckHook
];
- pythonRelaxDeps = true;
-
pythonImportsCheck = [ "nethsm" ];
+ disabledTestPaths = [
+ # Tests require a running Docker instance
+ "tests/test_nethsm_config.py"
+ "tests/test_nethsm_keys.py"
+ "tests/test_nethsm_namespaces.py"
+ "tests/test_nethsm_other.py"
+ "tests/test_nethsm_system.py"
+ "tests/test_nethsm_users.py"
+ ];
+
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 ];
+ license = licenses.asl20;
maintainers = with maintainers; [ frogamic ];
};
}