Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildPythonPackage
3, click
4, fetchFromGitHub
5, jsonschema
6, pytestCheckHook
7, pythonOlder
8, requests
9}:
10
11buildPythonPackage rec {
12 pname = "cvelib";
13 version = "1.2.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "RedHatProductSecurity";
20 repo = "cvelib";
21 rev = "tags/${version}";
22 hash = "sha256-8qlXwEbgLRZ1qYtBJ1c0nv6qfIOW5zAK9eOS+n+afWQ=";
23 };
24
25 SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
26
27 propagatedBuildInputs = [
28 click
29 jsonschema
30 requests
31 ];
32
33 checkInputs = [
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [
38 "cvelib"
39 ];
40
41 meta = with lib; {
42 description = "Library and a command line interface for the CVE Services API";
43 homepage = "https://github.com/RedHatProductSecurity/cvelib";
44 license = licenses.mit;
45 maintainers = with maintainers; [ raboof ];
46 };
47}