Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 click,
5 cve,
6 fetchFromGitHub,
7 jsonschema,
8 pytestCheckHook,
9 requests,
10 hatchling,
11 testers,
12}:
13
14buildPythonPackage rec {
15 pname = "cvelib";
16 version = "1.8.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "RedHatProductSecurity";
21 repo = "cvelib";
22 tag = version;
23 hash = "sha256-lbwrZSzJaP+nKFwt7xiq/LTzgOuf8aELxjrxEKkYpfc=";
24 };
25
26 build-system = [ hatchling ];
27
28 dependencies = [
29 click
30 jsonschema
31 requests
32 ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "cvelib" ];
37
38 passthru.tests.version = testers.testVersion { package = cve; };
39
40 meta = {
41 description = "Library and a command line interface for the CVE Services API";
42 homepage = "https://github.com/RedHatProductSecurity/cvelib";
43 changelog = "https://github.com/RedHatProductSecurity/cvelib/blob/${src.tag}/CHANGELOG.md";
44 license = lib.licenses.mit;
45 maintainers = with lib.maintainers; [ raboof ];
46 mainProgram = "cve";
47 };
48}