From e010085c33cd6fdb166934021ce45b7261a1440e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Jan 2024 15:54:37 +0100 Subject: [PATCH 1/2] python311Packages.textual-universal-directorytree: refactor --- .../textual-universal-directorytree/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/textual-universal-directorytree/default.nix b/pkgs/development/python-modules/textual-universal-directorytree/default.nix index 5f14accbaca7..875d66315040 100644 --- a/pkgs/development/python-modules/textual-universal-directorytree/default.nix +++ b/pkgs/development/python-modules/textual-universal-directorytree/default.nix @@ -10,12 +10,15 @@ , paramiko , requests , s3fs +, pythonOlder }: buildPythonPackage rec { pname = "textual-universal-directorytree"; version = "1.0.2"; - format = "pyproject"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "juftin"; @@ -44,7 +47,9 @@ buildPythonPackage rec { ]; }; - pythonImportsCheck = [ "textual_universal_directorytree" ]; + pythonImportsCheck = [ + "textual_universal_directorytree" + ]; meta = with lib; { description = "Textual plugin for a DirectoryTree compatible with remote filesystems"; From 19cee401a2943ceed6b6b57420286a9a0454749f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Jan 2024 15:55:00 +0100 Subject: [PATCH 2/2] python311Packages.textual-universal-directorytree: add patch for universal-pathlib --- .../textual-universal-directorytree/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/textual-universal-directorytree/default.nix b/pkgs/development/python-modules/textual-universal-directorytree/default.nix index 875d66315040..b36ce6ed84e9 100644 --- a/pkgs/development/python-modules/textual-universal-directorytree/default.nix +++ b/pkgs/development/python-modules/textual-universal-directorytree/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , hatchling , textual , universal-pathlib @@ -27,6 +28,15 @@ buildPythonPackage rec { hash = "sha256-FL2bwPGqBmDn33Rhj7+VEpuqB4znEAw+GGAODTs25oo="; }; + patches = [ + # universal-pathlib upgrade, https://github.com/juftin/textual-universal-directorytree/pull/2 + (fetchpatch { + name = "universal-pathlib-upgrade.patch"; + url = "https://github.com/juftin/textual-universal-directorytree/commit/e445aff21ddf756e3f180c8308a75c41487667c3.patch"; + hash = "sha256-Fftx8rrLPb6lQ+HBdB5Ai55LHMWEO6XftmFfZXbXIyk="; + }) + ]; + nativeBuildInputs = [ hatchling ];