1{ lib
2, python3
3, fetchFromGitHub
4, extras ? [ "all" ]
5}:
6
7python3.pkgs.buildPythonApplication rec {
8 pname = "browsr";
9 version = "1.10.7";
10 format = "pyproject";
11
12 src = fetchFromGitHub {
13 owner = "juftin";
14 repo = "browsr";
15 rev = "v${version}";
16 hash = "sha256-AT5cFQ4CldlHv3MQYAGXdZVB3bNAAvbJeosdxZjcPBM=";
17 };
18
19 nativeBuildInputs = with python3.pkgs; [
20 hatchling
21 pythonRelaxDepsHook
22 pytestCheckHook
23 ];
24
25 propagatedBuildInputs = with python3.pkgs; [
26 art
27 click
28 fsspec
29 pandas
30 pillow
31 pymupdf
32 rich
33 rich-click
34 rich-pixels
35 textual
36 universal-pathlib
37 ] ++ lib.attrVals extras passthru.optional-dependencies;
38
39 passthru.optional-dependencies = with python3.pkgs; {
40 all = [
41 adlfs
42 aiohttp
43 gcsfs
44 paramiko
45 pyarrow
46 requests
47 s3fs
48 ];
49 parquet = [
50 pyarrow
51 ];
52 remote = [
53 adlfs
54 aiohttp
55 gcsfs
56 paramiko
57 requests
58 s3fs
59 ];
60 };
61
62 pythonRelaxDeps = [
63 "fsspec"
64 "pymupdf"
65 "rich-click"
66 "textual"
67 ];
68
69 pythonImportsCheck = [ "browsr" ];
70
71 # requires internet access
72 disabledTests = [
73 "test_github_screenshot"
74 "test_github_screenshot_license"
75 "test_textual_app_context_path_github"
76 ];
77
78 meta = with lib; {
79 description = "A file explorer in your terminal";
80 homepage = "https://github.com/juftin/browsr";
81 changelog = "https://github.com/fsspec/universal_pathlib/releases/tag/${src.rev}";
82 license = licenses.mit;
83 maintainers = with maintainers; [ figsoda ];
84 };
85}