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