depot/third_party/nixpkgs/pkgs/development/python-modules/cvss/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

46 lines
937 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
jsonschema,
unittestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "cvss";
version = "3.2";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "RedHatProductSecurity";
repo = "cvss";
rev = "refs/tags/v${version}";
hash = "sha256-r4IWaOEZUX+3wW47rX8+lsixIjr14zAaXfFIFcbLVMM=";
};
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/v${version}";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ fab ];
mainProgram = "cvss_calculator";
};
}