blob: 51a54bdee1d42ddb18df329bcb69ca72b3368b4f (
plain)
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
45
46
47
48
49
50
51
52
|
{
lib,
buildPythonPackage,
callPackage,
fetchPypi,
setuptools,
swig,
}:
buildPythonPackage rec {
pname = "pykcs11";
version = "1.5.18";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-Ev2HizaYIdgMG+ihQMheig+xNY/Kq6ZspmhpITaS8ic=";
};
build-system = [ setuptools ];
nativeBuildInputs = [ swig ];
pypaBuildFlags = [ "--skip-dependency-check" ];
outputs = [
"out"
"testout"
];
postInstall = ''
mkdir $testout
cp -R test $testout/test
'';
pythonImportsCheck = [ "PyKCS11" ];
doCheck = false;
# tests complain about circular import, do testing with passthru.tests instead
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
meta = {
description = "PKCS#11 wrapper for Python";
homepage = "https://github.com/LudovicRousseau/PyKCS11";
changelog = "https://github.com/LudovicRousseau/PyKCS11/releases/tag/${version}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ hulr ];
};
}
|