summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-pkcs11/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/python-pkcs11/default.nix')
-rw-r--r--pkgs/development/python-modules/python-pkcs11/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-pkcs11/default.nix b/pkgs/development/python-modules/python-pkcs11/default.nix
new file mode 100644
index 00000000000..d0d4b4e98d3
--- /dev/null
+++ b/pkgs/development/python-modules/python-pkcs11/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, asn1crypto
+, buildPythonPackage
+, cached-property
+, cython
+, fetchFromGitHub
+, setuptools-scm
+}:
+
+buildPythonPackage rec {
+  pname = "python-pkcs11";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "danni";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0kncbipfpsb7m7mhv5s5b9wk604h1j08i2j26fn90pklgqll0xhv";
+  };
+
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+  nativeBuildInputs = [
+    cython
+    setuptools-scm
+  ];
+
+  propagatedBuildInputs = [
+    cached-property
+    asn1crypto
+  ];
+
+  # Test require additional setup
+  doCheck = false;
+
+  pythonImportsCheck = [ "pkcs11" ];
+
+  meta = with lib; {
+    description = "PKCS#11/Cryptoki support for Python";
+    homepage = "https://github.com/danni/python-pkcs11";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}