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";
|
2022-12-08 03:53:20 +01:00
|
|
|
version = "1.2.0";
|
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}";
|
2022-12-08 03:53:20 +01:00
|
|
|
hash = "sha256-8qlXwEbgLRZ1qYtBJ1c0nv6qfIOW5zAK9eOS+n+afWQ=";
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|