2022-11-27 09:42:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, jsonschema
|
2024-01-25 14:12:00 +00:00
|
|
|
, unittestCheckHook
|
2022-11-27 09:42:12 +00:00
|
|
|
, pythonOlder
|
2024-01-25 14:12:00 +00:00
|
|
|
, setuptools
|
2022-11-27 09:42:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cvss";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "3.0";
|
|
|
|
pyproject = true;
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RedHatProductSecurity";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "cvss";
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-xrkWpE13Y4KgQEZjitWE3Ka+IyfShqE2cj0/yzsAnX4=";
|
2022-11-27 09:42:12 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-27 09:42:12 +00:00
|
|
|
jsonschema
|
2024-01-25 14:12:00 +00:00
|
|
|
unittestCheckHook
|
2022-11-27 09:42:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cvss"
|
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
preCheck = ''
|
|
|
|
cd tests
|
|
|
|
'';
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-25 14:12:00 +00:00
|
|
|
description = "Library for CVSS2/3/4";
|
2022-11-27 09:42:12 +00:00
|
|
|
homepage = "https://github.com/RedHatProductSecurity/cvss";
|
|
|
|
changelog = "https://github.com/RedHatProductSecurity/cvss/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ lgpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|