From 421ed78cd2d6dcd24b09c0b1c67349318ceefa9b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 16 May 2024 01:44:34 +0000 Subject: [PATCH 1/3] python311Packages.cvelib: 1.3.0 -> 1.4.0 --- pkgs/development/python-modules/cvelib/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/cvelib/default.nix b/pkgs/development/python-modules/cvelib/default.nix index c269c351c1da..1c5fc15b94b9 100644 --- a/pkgs/development/python-modules/cvelib/default.nix +++ b/pkgs/development/python-modules/cvelib/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "cvelib"; - version = "1.3.0"; + version = "1.4.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,8 +20,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "RedHatProductSecurity"; repo = "cvelib"; - rev = "tags/${version}"; - hash = "sha256-PCZUAKgE80PD//4qK8ap55IN9vtx9WdpRZUAC3UdaWM="; + rev = "refs/tags/${version}"; + hash = "sha256-nj5bkep8jYJE1qh2zNxivjKOpHj93UZ8bU+qNs2On8s="; }; propagatedBuildInputs = [ From a958ef6f83386d149c82dfcc33e40f6c71b352fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 16 May 2024 09:13:51 +0200 Subject: [PATCH 2/3] python312Packages.cvelib: refactor --- .../python-modules/cvelib/default.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/cvelib/default.nix b/pkgs/development/python-modules/cvelib/default.nix index 1c5fc15b94b9..72abff8eccfa 100644 --- a/pkgs/development/python-modules/cvelib/default.nix +++ b/pkgs/development/python-modules/cvelib/default.nix @@ -1,19 +1,20 @@ { 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"; From 4eeb3f366191b4e3e789b923b1b35821d9f6ac79 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 16 May 2024 09:14:07 +0200 Subject: [PATCH 3/3] python312Packages.cvelib: format with nixfmt --- .../python-modules/cvelib/default.nix | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/cvelib/default.nix b/pkgs/development/python-modules/cvelib/default.nix index 72abff8eccfa..b51d4ea6f64f 100644 --- a/pkgs/development/python-modules/cvelib/default.nix +++ b/pkgs/development/python-modules/cvelib/default.nix @@ -1,14 +1,15 @@ -{ lib -, buildPythonPackage -, click -, cve -, fetchFromGitHub -, jsonschema -, pytestCheckHook -, pythonOlder -, requests -, setuptools -, testers +{ + lib, + buildPythonPackage, + click, + cve, + fetchFromGitHub, + jsonschema, + pytestCheckHook, + pythonOlder, + requests, + setuptools, + testers, }: buildPythonPackage rec { @@ -31,9 +32,7 @@ buildPythonPackage rec { --replace-fail '"collective.checkdocs",' "" ''; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; dependencies = [ click @@ -41,13 +40,9 @@ buildPythonPackage rec { requests ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ - "cvelib" - ]; + pythonImportsCheck = [ "cvelib" ]; passthru.tests.version = testers.testVersion { package = cve; };