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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
nix-update-script,
asn1crypto,
cryptography,
oscrypto,
requests,
uritools,
aiohttp,
freezegun,
pytest-asyncio,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "pyhanko-certvalidator";
version = "0.29.0";
pyproject = true;
src = fetchFromGitHub {
owner = "MatthiasValvekens";
repo = "pyhanko";
tag = "pyhanko-certvalidator/v${version}";
hash = "sha256-ZDHAcI2yoiVifYt05V85lz8mJmoyi10g4XoLQ+LhLHE=";
};
sourceRoot = "${src.name}/pkgs/pyhanko-certvalidator";
postPatch = ''
substituteInPlace src/pyhanko_certvalidator/version.py \
--replace-fail "0.0.0.dev1" "${version}" \
--replace-fail "(0, 0, 0, 'dev1')" "tuple(\"${version}\".split(\".\"))"
substituteInPlace pyproject.toml --replace-fail "0.0.0.dev1" "${version}"
'';
build-system = [ setuptools ];
dependencies = [
asn1crypto
cryptography
oscrypto
requests
uritools
];
nativeCheckInputs = [
aiohttp
freezegun
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "pyhanko_certvalidator" ];
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex=pyhanko-certvalidator/v(.*)"
];
};
meta = {
description = "Python library for validating X.509 certificates and paths";
homepage = "https://github.com/MatthiasValvekens/pyHanko/tree/master/pkgs/pyhanko-certvalidator";
changelog = "https://github.com/MatthiasValvekens/pyhanko/blob/pyhanko-certvalidator/${src.tag}/docs/changelog.rst#pyhanko-certvalidator";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.antonmosich ];
};
}
|