summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-pkcs11/default.nix
blob: d0d4b4e98d3921724b5a4e1e7e44f8cf568f9055 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 ];
  };
}