2022-11-24 14:30:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, jsonschema
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cvss";
|
2023-01-28 08:04:16 +00:00
|
|
|
version = "2.6";
|
2022-11-24 14:30:00 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RedHatProductSecurity";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-03 00:48:06 +00:00
|
|
|
hash = "sha256-gD9MreJQPaxziy02Wt3BGFiIoQ/+pW3KqiNfNlTijJY=";
|
2022-11-24 14:30:00 +00:00
|
|
|
};
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-24 14:30:00 +00:00
|
|
|
jsonschema
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cvss"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require additional data
|
|
|
|
"test_calculator"
|
|
|
|
"test_cvsslib"
|
|
|
|
"test_json_ordering"
|
|
|
|
"test_json_schema_repr"
|
|
|
|
"test_random"
|
|
|
|
"test_rh_vector"
|
|
|
|
"test_simple"
|
|
|
|
"test_simple_31"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for CVSS2/3";
|
|
|
|
homepage = "https://github.com/RedHatProductSecurity/cvss";
|
|
|
|
changelog = "https://github.com/RedHatProductSecurity/cvss/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ lgpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|