Files
nixpkgs/pkgs/development/python-modules/nethsm/default.nix
2026-09-03 11:45:30 +02:00

62 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
certifi,
cryptography,
fetchFromGitHub,
poetry-core,
pycryptodome,
pytestCheckHook,
typing-extensions,
urllib3,
}:
buildPythonPackage rec {
pname = "nethsm";
version = "3.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Nitrokey";
repo = "nethsm-sdk-py";
tag = "v${version}";
hash = "sha256-kOZ/kNvYlnKi/ojv4b4ZGmNZqARZPAT0g12xi6gw39E=";
};
pythonRelaxDeps = true;
build-system = [ poetry-core ];
dependencies = [
certifi
cryptography
typing-extensions
urllib3
];
nativeCheckInputs = [
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 = {
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/${src.tag}";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.panicgh ];
};
}