nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, pytestCheckHook
6, pythonOlder
7, colorful
8, tomlkit
9, git
10, packaging
11, requests
12}:
13
14buildPythonPackage rec {
15 pname = "pontos";
16 version = "22.5.0";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "greenbone";
23 repo = pname;
24 rev = "v${version}";
25 hash = "sha256-WTIuK5kPPqft4u44dN5NDJJKxIPrZGCJjZ5pR6HgOxw=";
26 };
27
28 nativeBuildInputs = [
29 poetry-core
30 ];
31
32 propagatedBuildInputs = [
33 colorful
34 tomlkit
35 packaging
36 requests
37 ];
38
39 checkInputs = [
40 git
41 pytestCheckHook
42 ];
43
44 postPatch = ''
45 substituteInPlace pyproject.toml \
46 --replace 'packaging = "^20.3"' 'packaging = "*"'
47 '';
48
49 disabledTests = [
50 # Signing fails
51 "test_find_no_signing_key"
52 "test_find_signing_key"
53 "test_find_unreleased_information"
54 # CLI test fails
55 "test_missing_cmd"
56 "test_update_file_changed"
57 ];
58
59 pythonImportsCheck = [
60 "pontos"
61 ];
62
63 meta = with lib; {
64 description = "Collection of Python utilities, tools, classes and functions";
65 homepage = "https://github.com/greenbone/pontos";
66 license = with licenses; [ gpl3Plus ];
67 maintainers = with maintainers; [ fab ];
68 };
69}