Files
nixpkgs/pkgs/development/python-modules/cvss/default.nix
2025-02-19 07:10:25 +00:00

47 lines
926 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
jsonschema,
unittestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "cvss";
version = "3.4";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "RedHatProductSecurity";
repo = "cvss";
tag = "v${version}";
hash = "sha256-g6+ccoIgqs7gZPrTuKm3em+PzLvpupb9JXOGMqf2Uv0=";
};
build-system = [ setuptools ];
nativeCheckInputs = [
jsonschema
unittestCheckHook
];
pythonImportsCheck = [ "cvss" ];
preCheck = ''
cd tests
'';
meta = with lib; {
description = "Library for CVSS2/3/4";
homepage = "https://github.com/RedHatProductSecurity/cvss";
changelog = "https://github.com/RedHatProductSecurity/cvss/releases/tag/${src.tag}";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ fab ];
mainProgram = "cvss_calculator";
};
}