Files
nixpkgs/pkgs/development/python-modules/cvss/default.nix
T
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

50 lines
955 B
Nix

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