diff options
| author | Fabian Affolter <mail@fabian-affolter.ch> | 2025-03-23 09:59:02 +0100 |
|---|---|---|
| committer | Fabian Affolter <mail@fabian-affolter.ch> | 2025-03-23 09:59:02 +0100 |
| commit | d657ca34a31a9b41b1fc016ca212c6b461b414f6 (patch) | |
| tree | edc18dcc90d84e8e80d7387c7909c642ddc5a4a2 | |
| parent | python312Packages.nethsm: refactor (diff) | |
| download | nixpkgs-d657ca34a31a9b41b1fc016ca212c6b461b414f6.tar.gz | |
python313Packages.nethsm: enable tests
| -rw-r--r-- | pkgs/development/python-modules/nethsm/default.nix | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/nethsm/default.nix b/pkgs/development/python-modules/nethsm/default.nix index 9adb0b7eb947..64ab1608a406 100644 --- a/pkgs/development/python-modules/nethsm/default.nix +++ b/pkgs/development/python-modules/nethsm/default.nix @@ -1,10 +1,14 @@ { lib, buildPythonPackage, - fetchPypi, - flit-core, certifi, cryptography, + docker, + fetchFromGitHub, + flit-core, + podman, + pycryptodome, + pytestCheckHook, python-dateutil, typing-extensions, urllib3, @@ -15,9 +19,11 @@ buildPythonPackage rec { version = "1.3.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-F0jSlT/xM8xaQWfUp87p+2RY/8hG7vRq8/VJ4a5Fkhw="; + src = fetchFromGitHub { + owner = "Nitrokey"; + repo = "nethsm-sdk-py"; + tag = "v${version}"; + hash = "sha256-vH5YjS3VO5krCMVQFcEgDhJeCUzo9EzFnBxq+zPuZ68="; }; pythonRelaxDeps = true; @@ -32,8 +38,25 @@ buildPythonPackage rec { urllib3 ]; + nativeCheckInputs = [ + docker + podman + pycryptodome + pytestCheckHook + ]; + 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"; |
