Files
nixpkgs/pkgs/development/python-modules/cvelib/default.nix

52 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
click,
cve,
fetchFromGitHub,
jsonschema,
pytestCheckHook,
pythonOlder,
requests,
hatchling,
testers,
}:
buildPythonPackage rec {
pname = "cvelib";
version = "1.8.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "RedHatProductSecurity";
repo = "cvelib";
tag = version;
hash = "sha256-lbwrZSzJaP+nKFwt7xiq/LTzgOuf8aELxjrxEKkYpfc=";
};
build-system = [ hatchling ];
dependencies = [
click
jsonschema
requests
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "cvelib" ];
passthru.tests.version = testers.testVersion { package = cve; };
meta = with lib; {
description = "Library and a command line interface for the CVE Services API";
homepage = "https://github.com/RedHatProductSecurity/cvelib";
changelog = "https://github.com/RedHatProductSecurity/cvelib/blob/${src.tag}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ raboof ];
mainProgram = "cve";
};
}