1{ lib
2, asn1crypto
3, buildPythonPackage
4, cached-property
5, cython
6, fetchFromGitHub
7, setuptools-scm
8}:
9
10buildPythonPackage rec {
11 pname = "python-pkcs11";
12 version = "0.7.0";
13
14 src = fetchFromGitHub {
15 owner = "danni";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "0kncbipfpsb7m7mhv5s5b9wk604h1j08i2j26fn90pklgqll0xhv";
19 };
20
21 SETUPTOOLS_SCM_PRETEND_VERSION = version;
22
23 nativeBuildInputs = [
24 cython
25 setuptools-scm
26 ];
27
28 propagatedBuildInputs = [
29 cached-property
30 asn1crypto
31 ];
32
33 # Test require additional setup
34 doCheck = false;
35
36 pythonImportsCheck = [ "pkcs11" ];
37
38 meta = with lib; {
39 description = "PKCS#11/Cryptoki support for Python";
40 homepage = "https://github.com/danni/python-pkcs11";
41 license = with licenses; [ mit ];
42 maintainers = with maintainers; [ fab ];
43 };
44}