From ca49d19831ac90a954b44d9c3450bab543e2ff43 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 9 Nov 2024 08:31:26 +0100 Subject: [PATCH 1/5] python312Packages.terminaltables3: init at 4.0.0-unstable-2024-07-21 Generate simple tables in terminals from a nested list of strings https://github.com/matthewdeanmartin/terminaltables3 --- .../terminaltables3/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/terminaltables3/default.nix diff --git a/pkgs/development/python-modules/terminaltables3/default.nix b/pkgs/development/python-modules/terminaltables3/default.nix new file mode 100644 index 000000000000..ea4351ea7007 --- /dev/null +++ b/pkgs/development/python-modules/terminaltables3/default.nix @@ -0,0 +1,58 @@ +{ + lib, + buildPythonPackage, + colorama, + colorclass, + fetchFromGitHub, + poetry-core, + pytest-cov-stub, + pytest-xdist, + pytestCheckHook, + pythonOlder, + termcolor, +}: + +buildPythonPackage rec { + pname = "terminaltables3"; + version = "4.0.0-unstable-2024-07-21"; + pyproject = true; + + disabled = pythonOlder "3.11"; + + src = fetchFromGitHub { + owner = "matthewdeanmartin"; + repo = "terminaltables3"; + #rev = "refs/tags/v${version}"; + rev = "f1c465b36eb9b91a984d8864b21376e7c37075b8"; + hash = "sha256-UcEovh1Eb4QNPwLGDjCphPlJSSkOdhCJ2fK3tuSWOTc="; + }; + + build-system = [ poetry-core ]; + + nativeCheckInputs = [ + colorama + colorclass + pytest-cov-stub + pytest-xdist + pytestCheckHook + termcolor + ]; + + pythonImportsCheck = [ "terminaltables3" ]; + + disabledTests = [ + # Tests are comparing CLI output + "test_color" + "test_colors" + "test_height" + "test_width" + ]; + + meta = { + description = "Generate simple tables in terminals from a nested list of strings"; + homepage = "https://github.com/matthewdeanmartin/terminaltables3"; + changelog = "https://github.com/matthewdeanmartin/terminaltables3/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 48a04dffe93b..5343c8c0fe05 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15660,6 +15660,8 @@ self: super: with self; { terminaltables = callPackage ../development/python-modules/terminaltables { }; + terminaltables3 = callPackage ../development/python-modules/terminaltables3 { }; + terminaltexteffects = callPackage ../development/python-modules/terminaltexteffects { }; termplotlib = callPackage ../development/python-modules/termplotlib { }; From 846aa24c45527e1dcff76d5b21996ed41ce556cb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 14 Nov 2024 10:03:59 +0100 Subject: [PATCH 2/5] python312Packages.keep: update build-system --- pkgs/development/python-modules/keep/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/keep/default.nix b/pkgs/development/python-modules/keep/default.nix index 6023df467420..d14cc04f7317 100644 --- a/pkgs/development/python-modules/keep/default.nix +++ b/pkgs/development/python-modules/keep/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + flit-core, pygithub, terminaltables, click, @@ -11,14 +12,16 @@ buildPythonPackage rec { pname = "keep"; version = "2.11"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "sha256-Brwvu/Zevr8sOE3KAwakDDzVMc2VoFxIb1orXAes2U0="; }; - propagatedBuildInputs = [ + build-system = [ flit-core ]; + + dependencies = [ click requests terminaltables From 0733bbf17e815c0daaa7ac8deb1a19329cfef311 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 14 Nov 2024 10:07:03 +0100 Subject: [PATCH 3/5] python312Packages.keep: update meta --- pkgs/development/python-modules/keep/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/keep/default.nix b/pkgs/development/python-modules/keep/default.nix index d14cc04f7317..453a527dd50a 100644 --- a/pkgs/development/python-modules/keep/default.nix +++ b/pkgs/development/python-modules/keep/default.nix @@ -32,12 +32,12 @@ buildPythonPackage rec { doCheck = false; pythonImportsCheck = [ "keep" ]; - meta = with lib; { - homepage = "https://github.com/orkohunter/keep"; - description = "Meta CLI toolkit: Personal shell command keeper and snippets manager"; + meta = { + description = "Meta CLI toolkit to keep personal shell command keeper and manage snippets"; + homepage = "https://github.com/OrkoHunter/keep"; + changelog = "https://github.com/OrkoHunter/keep/releases/tag/${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ris ]; mainProgram = "keep"; - platforms = platforms.all; - license = licenses.mit; - maintainers = with maintainers; [ ris ]; }; } From 2333f106ddc60d8c20131f27cd0f835f20fdfa65 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 14 Nov 2024 10:08:23 +0100 Subject: [PATCH 4/5] python312Packages.keep: update ordering - update comment - add blank line --- pkgs/development/python-modules/keep/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/keep/default.nix b/pkgs/development/python-modules/keep/default.nix index 453a527dd50a..8c7a90216d65 100644 --- a/pkgs/development/python-modules/keep/default.nix +++ b/pkgs/development/python-modules/keep/default.nix @@ -1,12 +1,12 @@ { lib, buildPythonPackage, + click, fetchPypi, flit-core, pygithub, - terminaltables, - click, requests, + terminaltables, }: buildPythonPackage rec { @@ -16,20 +16,21 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "sha256-Brwvu/Zevr8sOE3KAwakDDzVMc2VoFxIb1orXAes2U0="; + hash = "sha256-Brwvu/Zevr8sOE3KAwakDDzVMc2VoFxIb1orXAes2U0="; }; build-system = [ flit-core ]; dependencies = [ click + pygithub requests terminaltables - pygithub ]; - # no tests + # Module no tests doCheck = false; + pythonImportsCheck = [ "keep" ]; meta = { From 35ab575cedec441582d731472a1e4ec29ef8d166 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 14 Nov 2024 10:09:16 +0100 Subject: [PATCH 5/5] python312Packages.keep: replace terminaltables with terminaltables3 --- pkgs/development/python-modules/keep/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/keep/default.nix b/pkgs/development/python-modules/keep/default.nix index 8c7a90216d65..249551dc7201 100644 --- a/pkgs/development/python-modules/keep/default.nix +++ b/pkgs/development/python-modules/keep/default.nix @@ -6,7 +6,7 @@ flit-core, pygithub, requests, - terminaltables, + terminaltables3, }: buildPythonPackage rec { @@ -25,7 +25,7 @@ buildPythonPackage rec { click pygithub requests - terminaltables + terminaltables3 ]; # Module no tests