Commit a958ef6f authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.cvelib: refactor

parent 421ed78c
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, click
, cve
, fetchFromGitHub
, jsonschema
, pytestCheckHook
, pythonOlder
, requests
, setuptools
, testers
, cve
}:

buildPythonPackage rec {
  pname = "cvelib";
  version = "1.4.0";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

@@ -24,7 +25,17 @@ buildPythonPackage rec {
    hash = "sha256-nj5bkep8jYJE1qh2zNxivjKOpHj93UZ8bU+qNs2On8s=";
  };

  propagatedBuildInputs = [
  postPatch = ''
    # collective.checkdocs is unmaintained for over 10 years
    substituteInPlace pyproject.toml \
      --replace-fail '"collective.checkdocs",' ""
  '';

  build-system = [
    setuptools
  ];

  dependencies = [
    click
    jsonschema
    requests
@@ -43,6 +54,7 @@ buildPythonPackage rec {
  meta = with lib; {
    description = "Library and a command line interface for the CVE Services API";
    homepage = "https://github.com/RedHatProductSecurity/cvelib";
    changelog = "https://github.com/RedHatProductSecurity/cvelib/blob/${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ raboof ];
    mainProgram = "cve";