depot/third_party/nixpkgs/pkgs/development/python-modules/pontos/default.nix
Default email 792b51d22f Project import generated by Copybara.
GitOrigin-RevId: d5f237872975e6fb6f76eef1368b5634ffcd266f
2022-02-20 05:27:41 +00:00

68 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, pythonOlder
, colorful
, tomlkit
, git
, packaging
, requests
}:
buildPythonPackage rec {
pname = "pontos";
version = "22.2.2";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "greenbone";
repo = pname;
rev = "v${version}";
hash = "sha256-9QnimA9y5mVgJA9LkDVC+eNyp6Ltvw+fErtoSVL/1iw=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
colorful
tomlkit
packaging
requests
];
checkInputs = [
git
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'packaging = "^20.3"' 'packaging = "*"'
'';
disabledTests = [
# Signing fails
"test_find_no_signing_key"
"test_find_signing_key"
"test_find_unreleased_information"
# CLI test fails
"test_missing_cmd"
];
pythonImportsCheck = [
"pontos"
];
meta = with lib; {
description = "Collection of Python utilities, tools, classes and functions";
homepage = "https://github.com/greenbone/pontos";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ fab ];
};
}