1{ lib
2, buildPythonPackage
3, colorful
4, fetchFromGitHub
5, git
6, httpx
7, lxml
8, packaging
9, poetry-core
10, pytestCheckHook
11, python-dateutil
12, pythonOlder
13, semver
14, rich
15, tomlkit
16, typing-extensions
17}:
18
19buildPythonPackage rec {
20 pname = "pontos";
21 version = "23.5.3";
22 format = "pyproject";
23
24 disabled = pythonOlder "3.9";
25
26 src = fetchFromGitHub {
27 owner = "greenbone";
28 repo = pname;
29 rev = "refs/tags/v${version}";
30 hash = "sha256-QZJziSncO44KqvMTvpaQkIVAooLH8sKMt0TAC7L8UNs=";
31 };
32
33 nativeBuildInputs = [
34 poetry-core
35 ];
36
37 propagatedBuildInputs = [
38 colorful
39 httpx
40 lxml
41 packaging
42 python-dateutil
43 semver
44 rich
45 typing-extensions
46 tomlkit
47 ] ++ lib.optionals (pythonOlder "3.8") [
48 typing-extensions
49 ] ++ httpx.optional-dependencies.http2;
50
51 nativeCheckInputs = [
52 git
53 pytestCheckHook
54 ];
55
56 disabledTests = [
57 "PrepareTestCase"
58 # Signing fails
59 "test_find_no_signing_key"
60 "test_find_signing_key"
61 "test_find_unreleased_information"
62 # CLI test fails
63 "test_missing_cmd"
64 "test_update_file_changed"
65 # Network access
66 "test_fail_sign_on_upload_fail"
67 "test_successfully_sign"
68 # calls git log, but our fetcher removes .git
69 "test_git_error"
70 ];
71
72 pythonImportsCheck = [
73 "pontos"
74 ];
75
76 meta = with lib; {
77 description = "Collection of Python utilities, tools, classes and functions";
78 homepage = "https://github.com/greenbone/pontos";
79 changelog = "https://github.com/greenbone/pontos/releases/tag/v${version}";
80 license = with licenses; [ gpl3Plus ];
81 maintainers = with maintainers; [ fab ];
82 };
83}