1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pyopenssl,
7 tldextract,
8 pytest-cov-stub,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage {
14 pname = "certauth";
15 version = "1.3.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "ikreymer";
22 repo = "certauth";
23 # Repo has no git tags, https://github.com/ikreymer/certauth/issues/15
24 rev = "ad2bae5d40a9e45519fc1f2cd7678174bbc55b3d";
25 hash = "sha256-Rso5N0jb9k7bdorjPIUMNiZZPnzwbkxFNiTpsJ9pco0=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
31 pyopenssl
32 tldextract
33 ];
34
35 nativeCheckInputs = [
36 pytest-cov-stub
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "certauth" ];
41
42 disabledTests = [
43 # https://github.com/ikreymer/certauth/issues/23
44 "test_ca_cert_in_mem"
45 "test_custom_not_before_not_after"
46 # Tests want to download Public Suffix List
47 "test_file_wildcard"
48 "test_file_wildcard_subdomains"
49 "test_in_mem_parent_wildcard_cert"
50 "test_in_mem_parent_wildcard_cert_at_tld"
51 "test_in_mem_parent_wildcard_cert_2"
52 ];
53
54 meta = with lib; {
55 description = "Simple CertificateAuthority and host certificate creation, useful for man-in-the-middle HTTPS proxy";
56 mainProgram = "certauth";
57 homepage = "https://github.com/ikreymer/certauth";
58 license = licenses.mit;
59 maintainers = with maintainers; [ Luflosi ];
60 };
61}