Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pyopenssl,
7 tldextract,
8 pytest-cov-stub,
9 pytestCheckHook,
10}:
11
12buildPythonPackage {
13 pname = "certauth";
14 version = "1.3.0";
15 pyproject = true;
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 nativeBuildInputs = [ setuptools ];
26
27 propagatedBuildInputs = [
28 pyopenssl
29 tldextract
30 ];
31
32 nativeCheckInputs = [
33 pytest-cov-stub
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [ "certauth" ];
38
39 disabledTests = [
40 # https://github.com/ikreymer/certauth/issues/23
41 "test_ca_cert_in_mem"
42 "test_custom_not_before_not_after"
43 # Tests want to download Public Suffix List
44 "test_file_wildcard"
45 "test_file_wildcard_subdomains"
46 "test_in_mem_parent_wildcard_cert"
47 "test_in_mem_parent_wildcard_cert_at_tld"
48 "test_in_mem_parent_wildcard_cert_2"
49 ];
50
51 meta = {
52 description = "Simple CertificateAuthority and host certificate creation, useful for man-in-the-middle HTTPS proxy";
53 mainProgram = "certauth";
54 homepage = "https://github.com/ikreymer/certauth";
55 license = lib.licenses.mit;
56 maintainers = with lib.maintainers; [ Luflosi ];
57 };
58}