2022-11-12 23:26:52 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
2022-10-05 17:39:37 +02:00
|
|
|
, fetchFromGitHub
|
2022-11-12 23:26:52 +01:00
|
|
|
, jsonschema
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-10-05 17:39:37 +02:00
|
|
|
, requests
|
2022-12-08 09:14:22 +01:00
|
|
|
, testers
|
|
|
|
, cve
|
2022-10-05 17:39:37 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cvelib";
|
2023-02-21 00:45:26 +01:00
|
|
|
version = "1.2.1";
|
2022-11-12 23:26:52 +01:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-10-05 17:39:37 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RedHatProductSecurity";
|
|
|
|
repo = "cvelib";
|
|
|
|
rev = "tags/${version}";
|
2023-02-21 00:45:26 +01:00
|
|
|
hash = "sha256-hJPcxnc4iQzsYNNVJ9fw6yQl+5K7pdtjHT6oMmBx/Zs=";
|
2022-10-05 17:39:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
|
2022-11-12 23:26:52 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
jsonschema
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [
|
2022-11-12 23:26:52 +01:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-10-05 17:39:37 +02:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cvelib"
|
|
|
|
];
|
|
|
|
|
2022-12-08 09:14:22 +01:00
|
|
|
passthru.tests.version = testers.testVersion { package = cve; };
|
|
|
|
|
2022-10-05 17:39:37 +02:00
|
|
|
meta = with lib; {
|
2022-11-12 23:26:52 +01:00
|
|
|
description = "Library and a command line interface for the CVE Services API";
|
2022-10-05 17:39:37 +02:00
|
|
|
homepage = "https://github.com/RedHatProductSecurity/cvelib";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ raboof ];
|
2022-12-08 09:14:22 +01:00
|
|
|
mainProgram = "cve";
|
2022-10-05 17:39:37 +02:00
|
|
|
};
|
|
|
|
}
|