From 4a813508a979c7ae9042e54ad15877aae06c0d09 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 May 2024 10:17:17 +0200 Subject: [PATCH 1/2] python312Packages.click-spinner: refactor - add pythonImportsCheck - add changelog to meta - disable on unsupported Python releases - remove vendorized versioneer --- .../python-modules/click-spinner/default.nix | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/click-spinner/default.nix b/pkgs/development/python-modules/click-spinner/default.nix index 0c281c29ab4c..3afcd1e83a8d 100644 --- a/pkgs/development/python-modules/click-spinner/default.nix +++ b/pkgs/development/python-modules/click-spinner/default.nix @@ -1,30 +1,49 @@ { lib , buildPythonPackage -, fetchPypi , click -, six +, fetchPypi , pytestCheckHook +, pythonOlder +, setuptools +, six +, versioneer }: buildPythonPackage rec { pname = "click-spinner"; version = "0.1.10"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "h+rPnXKYlzol12Fe9X1Hgq6/kTpTK7pLKKN+Nm6XXa8="; + hash = "sha256-h+rPnXKYlzol12Fe9X1Hgq6/kTpTK7pLKKN+Nm6XXa8="; }; + postPatch = '' + rm versioneer.py + ''; + + build-system = [ + setuptools + versioneer + ]; + nativeCheckInputs = [ click - six pytestCheckHook + six + ]; + + pythonImportsCheck = [ + "click_spinner" ]; meta = with lib; { description = "Add support for showwing that command line app is active to Click"; homepage = "https://github.com/click-contrib/click-spinner"; + changelog = "https://github.com/click-contrib/click-spinner/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ ]; }; From e0098c24907cd49bc9cea846dfadbafcaf8d107e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 May 2024 10:19:00 +0200 Subject: [PATCH 2/2] python312Packages.click-spinner: format with nixfmt --- .../python-modules/click-spinner/default.nix | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/click-spinner/default.nix b/pkgs/development/python-modules/click-spinner/default.nix index 3afcd1e83a8d..dd9ee1c021f2 100644 --- a/pkgs/development/python-modules/click-spinner/default.nix +++ b/pkgs/development/python-modules/click-spinner/default.nix @@ -1,12 +1,13 @@ -{ lib -, buildPythonPackage -, click -, fetchPypi -, pytestCheckHook -, pythonOlder -, setuptools -, six -, versioneer +{ + lib, + buildPythonPackage, + click, + fetchPypi, + pytestCheckHook, + pythonOlder, + setuptools, + six, + versioneer, }: buildPythonPackage rec { @@ -36,9 +37,7 @@ buildPythonPackage rec { six ]; - pythonImportsCheck = [ - "click_spinner" - ]; + pythonImportsCheck = [ "click_spinner" ]; meta = with lib; { description = "Add support for showwing that command line app is active to Click";