From 3f87b172c76112c8674333c0f0f4680ca80bc787 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 4 May 2022 16:07:38 +0200 Subject: [PATCH 1/2] python3Packages.textual: 0.1.15 -> 0.1.18 --- .../python-modules/textual/default.nix | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/textual/default.nix b/pkgs/development/python-modules/textual/default.nix index e14c64730a2..5806b28e349 100644 --- a/pkgs/development/python-modules/textual/default.nix +++ b/pkgs/development/python-modules/textual/default.nix @@ -1,38 +1,34 @@ { lib , buildPythonPackage , fetchFromGitHub -, fetchpatch , poetry-core , rich , typing-extensions , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "textual"; - version = "0.1.15"; + version = "0.1.18"; format = "pyproject"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "Textualize"; repo = pname; rev = "v${version}"; - sha256 = "1jmjais0yq8dwi9yikgrxdw4rwp8aq1981nhfxn0v97jb07i4cj6"; + sha256 = "sha256-XVmbt8r5HL8r64ISdJozmM+9HuyvqbpdejWICzFnfiw="; }; - patches = [ - (fetchpatch { - # v0.1.15 git tag has 0.1.14 in pyproject.toml - name = "version.patch"; - url = "https://github.com/Textualize/textual/commit/1b8d7d184e10889002425641222702afba508aea.patch"; - sha256 = "1nfqp5f8ba3fg0ar3lghrlqypbjbsaywxaz3iiff8fy8j2wgsppp"; - }) + nativeBuildInputs = [ + poetry-core ]; - nativeBuildInputs = [ poetry-core ]; - propagatedBuildInputs = [ rich + ] ++ lib.optionals (pythonOlder "3.9") [ typing-extensions ]; @@ -40,7 +36,14 @@ buildPythonPackage rec { pytestCheckHook ]; - pythonImportsCheck = [ "textual" ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'rich = "^12.3.0"' 'rich = "*"' + ''; + + pythonImportsCheck = [ + "textual" + ]; meta = with lib; { description = "TUI framework for Python inspired by modern web development"; From 2efd1090cf5931bd2e0f328713919ca4bc8adad7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 4 May 2022 16:23:18 +0200 Subject: [PATCH 2/2] rich-cli: 1.5.1 -> 1.7.0 --- pkgs/misc/rich-cli/default.nix | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pkgs/misc/rich-cli/default.nix b/pkgs/misc/rich-cli/default.nix index e2970bd30ba..17ea9ffee6e 100644 --- a/pkgs/misc/rich-cli/default.nix +++ b/pkgs/misc/rich-cli/default.nix @@ -1,17 +1,20 @@ -{ lib, python3 }: +{ lib +, python3 +}: python3.pkgs.buildPythonApplication rec { pname = "rich-cli"; - version = "1.5.1"; + version = "1.7.0"; + format = "pyproject"; src = python3.pkgs.fetchPypi { inherit pname version; - sha256 = "18qpdaw4drkwq71xikngwaarkjxhfc0nrb1zm36rw31b8dz0ij2k"; + sha256 = "sha256-fporylec9H+9G2v8D0O32ek7OQs3YRSma1xOpakClqk="; }; - format = "pyproject"; - - nativeBuildInputs = [ python3.pkgs.poetry-core ]; + nativeBuildInputs = with python3.pkgs; [ + poetry-core + ]; propagatedBuildInputs = with python3.pkgs; [ rich @@ -21,11 +24,18 @@ python3.pkgs.buildPythonApplication rec { rich-rst ]; - buildInputs = [ python3 ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'rich = "^12.3.0"' 'rich = "*"' + ''; + + pythonImportsCheck = [ + "rich_cli" + ]; meta = with lib; { - homepage = "https://github.com/Textualize/rich-cli"; description = "Command Line Interface to Rich"; + homepage = "https://github.com/Textualize/rich-cli"; license = licenses.mit; maintainers = with maintainers; [ jyooru ]; };