Skip to content

Commit

Permalink
python311Packages.cvss: 2.6 -> 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff committed Jan 24, 2024
1 parent deba75a commit eb81a15
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions pkgs/development/python-modules/cvss/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,44 @@
, buildPythonPackage
, fetchFromGitHub
, jsonschema
, pytestCheckHook
, unittestCheckHook
, pythonOlder
, setuptools
}:

buildPythonPackage rec {
pname = "cvss";
version = "2.6";
format = "setuptools";
version = "3.0";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchFromGitHub {
owner = "RedHatProductSecurity";
repo = pname;
repo = "cvss";
rev = "refs/tags/v${version}";
hash = "sha256-gD9MreJQPaxziy02Wt3BGFiIoQ/+pW3KqiNfNlTijJY=";
hash = "sha256-xrkWpE13Y4KgQEZjitWE3Ka+IyfShqE2cj0/yzsAnX4=";
};

nativeBuildInputs = [
setuptools
];

nativeCheckInputs = [
jsonschema
pytestCheckHook
unittestCheckHook
];

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"
];
preCheck = ''
cd tests
'';

meta = with lib; {
description = "Library for CVSS2/3";
description = "Library for CVSS2/3/4";
homepage = "https://github.com/RedHatProductSecurity/cvss";
changelog = "https://github.com/RedHatProductSecurity/cvss/releases/tag/v${version}";
license = with licenses; [ lgpl3Plus ];
Expand Down

0 comments on commit eb81a15

Please sign in to comment.