1{ lib
2, buildPythonPackage
3, cryptography
4, fetchFromGitHub
5, pytestCheckHook
6, pytest-mock
7, pythonOlder
8, six
9}:
10
11buildPythonPackage rec {
12 pname = "cert-chain-resolver";
13 version = "1.0.1";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "rkoopmans";
20 repo = "python-certificate-chain-resolver";
21 rev = version;
22 hash = "sha256-NLTRx6J6pjs7lyschHN5KtgrnpQpEyvZ2zz0pSd5sc4=";
23 };
24
25 propagatedBuildInputs = [
26 cryptography
27 ];
28
29 checkInputs = [
30 pytestCheckHook
31 pytest-mock
32 six
33 ];
34
35 disabledTests = [
36 # Tests require network access
37 "test_cert_returns_completed_chain"
38 "test_display_flag_is_properly_formatted"
39 ];
40
41 pythonImportsCheck = [
42 "cert_chain_resolver"
43 ];
44
45 meta = with lib; {
46 description = "Resolve / obtain the certificate intermediates of a x509 certificate";
47 homepage = "https://github.com/rkoopmans/python-certificate-chain-resolver";
48 license = licenses.mit;
49 maintainers = with maintainers; [ veehaitch ];
50 };
51}