2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-02-29 20:09:43 +00:00
|
|
|
, fetchpatch
|
2023-07-15 17:15:38 +00:00
|
|
|
, hatchling
|
|
|
|
, textual
|
|
|
|
, universal-pathlib
|
|
|
|
, adlfs
|
|
|
|
, aiohttp
|
|
|
|
, gcsfs
|
|
|
|
, paramiko
|
|
|
|
, requests
|
|
|
|
, s3fs
|
2024-02-29 20:09:43 +00:00
|
|
|
, pythonOlder
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "textual-universal-directorytree";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "1.0.2";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "juftin";
|
|
|
|
repo = "textual-universal-directorytree";
|
2023-10-19 13:55:26 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-FL2bwPGqBmDn33Rhj7+VEpuqB4znEAw+GGAODTs25oo=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
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=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
textual
|
|
|
|
universal-pathlib
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
remote = [
|
|
|
|
adlfs
|
|
|
|
aiohttp
|
|
|
|
gcsfs
|
|
|
|
paramiko
|
|
|
|
requests
|
|
|
|
s3fs
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"textual_universal_directorytree"
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Textual plugin for a DirectoryTree compatible with remote filesystems";
|
|
|
|
homepage = "https://github.com/juftin/textual-universal-directorytree";
|
|
|
|
changelog = "https://github.com/juftin/textual-universal-directorytree/releases/tag/${src.rev}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|