about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/cve-bin-tool/default.nix
blob: ac3771510c38f1a0d017b0c6e19c53a34c20a00d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{ lib
, buildPythonApplication
, fetchFromGitHub
, jsonschema
, plotly
, beautifulsoup4
, pyyaml
, isort
, py
, jinja2
, rpmfile
, reportlab
, zstandard
, rich
, aiohttp
, toml
, distro
  # aiohttp[speedups]
, aiodns
, brotlipy
, cchardet
, pillow
, pytestCheckHook
, xmlschema
, setuptools
, packaging
}:
buildPythonApplication rec {
  pname = "cve-bin-tool";
  version = "3.1.1";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "cve-bin-tool";
    rev = "v${version}";
    sha256 = "0nz3ax3ldnrzk8694x0p743g5h2zply29ljpn21llbc7ca27zdv9";
  };

  # Wants to open a sqlite database, access the internet, etc
  doCheck = false;

  propagatedBuildInputs = [
    jsonschema
    plotly
    beautifulsoup4
    pyyaml
    isort
    py
    jinja2
    rpmfile
    reportlab
    zstandard
    rich
    aiohttp
    toml
    distro
    # aiohttp[speedups]
    aiodns
    brotlipy
    cchardet
    # needed by brotlipy
    pillow
    setuptools
    xmlschema
    packaging
  ];

  checkInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "cve_bin_tool"
  ];

  # required until https://github.com/intel/cve-bin-tool/pull/1665 is merged
  postPatch = ''
    sed '/^pytest/d' -i requirements.txt
  '';

  meta = with lib; {
    description = "CVE Binary Checker Tool";
    homepage = "https://github.com/intel/cve-bin-tool";
    license = licenses.gpl3Plus;
    maintainers = teams.determinatesystems.members;
  };
}