Commit c97c7525 authored by tea's avatar tea
Browse files

cve-bin-util: restructure build inputs

* move python runtime dependencies to `dependencies` and `optional-dependencies`
* move `pip` to `propagatedBuildInputs` since it's only required at
  runtime
* remove unused dependencies
  * `isort` is only used for formatting during development
* sort dependencies alphabetically
parent efcd99da
Loading
Loading
Loading
Loading
+42 −46
Original line number Diff line number Diff line
{ lib
, buildPythonApplication
, fetchFromGitHub
  # aiohttp[speedups]
, aiodns
, aiohttp
, beautifulsoup4
, brotlipy
, cvss
, distro
, filetype
, google-cloud-sdk
, jinja2
, jsonschema
, lib4sbom
, packageurl-python
, python-gnupg
, packaging
, plotly
, beautifulsoup4
, pytestCheckHook
, python-gnupg
, pyyaml
, isort
, py
, jinja2
, rpmfile
, reportlab
, zstandard
, rich
, aiohttp
, rpmfile
, setuptools
, toml
, distro
  # aiohttp[speedups]
, aiodns
, brotlipy
, faust-cchardet
, pillow
, pytestCheckHook
, xmlschema
, setuptools
, packaging
, cvss
, google-cloud-sdk
, zstandard
, reportlab
, pip
, testers
, cve-bin-tool
@@ -50,45 +46,45 @@ buildPythonApplication rec {
  # Wants to open a sqlite database, access the internet, etc
  doCheck = false;

  propagatedNativeBuildInputs = [
    pip
  ];

  propagatedBuildInputs = [
    google-cloud-sdk
  dependencies = [
    # aiohttp[speedups]
    aiodns
    aiohttp
    beautifulsoup4
    brotlipy
    cvss
    distro
    filetype
    google-cloud-sdk # gsutil
    jinja2
    jsonschema
    lib4sbom
    packageurl-python
    python-gnupg
    packaging
    plotly
    beautifulsoup4
    python-gnupg
    pyyaml
    isort
    py
    jinja2
    rpmfile
    reportlab
    zstandard
    rich
    aiohttp
    toml
    distro
    # aiohttp[speedups]
    aiodns
    brotlipy
    faust-cchardet
    # needed by brotlipy
    pillow
    rpmfile
    setuptools
    toml
    xmlschema
    cvss
    packaging
    zstandard
  ];

  optional-dependencies = {
    pdf = [
      reportlab
    ];
  };

  propagatedBuildInputs = [
    pip
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];
  ] ++ lib.flatten (lib.attrValues optional-dependencies);

  pythonImportsCheck = [
    "cve_bin_tool"