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