vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / pkgs / applications / file-managers / browsr / default.nix
blob435577aa567b80e4fe57deac6847d3186dc70ae2
1 { lib
2 , python3
3 , fetchFromGitHub
4 , extras ? [ "all" ]
5 }:
7 python3.pkgs.buildPythonApplication rec {
8   pname = "browsr";
9   version = "1.21.0";
10   pyproject = true;
12   src = fetchFromGitHub {
13     owner = "juftin";
14     repo = "browsr";
15     rev = "refs/tags/v${version}";
16     hash = "sha256-76OzJOunZRVSGalQiyX+TSukD8rRIFHxA713NqOn3PY=";
17   };
19   nativeBuildInputs = with python3.pkgs; [
20     hatchling
21   ];
23   propagatedBuildInputs = with python3.pkgs; [
24     art
25     click
26     pandas
27     pillow
28     pymupdf
29     pyperclip
30     rich
31     rich-click
32     rich-pixels
33     textual
34     textual-universal-directorytree
35   ] ++ lib.attrVals extras optional-dependencies;
37   optional-dependencies = with python3.pkgs; {
38     all = [
39       pyarrow
40       textual-universal-directorytree.optional-dependencies.remote
41     ];
42     parquet = [
43       pyarrow
44     ];
45     remote = [
46       textual-universal-directorytree.optional-dependencies.remote
47     ];
48   };
50   nativeCheckInputs = with python3.pkgs; [
51     pytest-textual-snapshot
52     pytestCheckHook
53   ];
55   pythonRelaxDeps = [
56     "art"
57     "pandas"
58     "pymupdf"
59     "pyperclip"
60     "rich-click"
61     "rich-pixels"
62     "rich"
63     "textual"
64   ];
66   pythonImportsCheck = [
67     "browsr"
68   ];
70   pytestFlagsArray = [
71     "--snapshot-update"
72   ];
74   disabledTests = [
75     # Tests require internet access
76     "test_github_screenshot"
77     "test_github_screenshot_license"
78     "test_textual_app_context_path_github"
79     "test_mkdocs_screenshot"
80     # Different output
81     "test_textual_app_context_path"
82   ];
84   meta = with lib; {
85     description = "File explorer in your terminal";
86     mainProgram = "browsr";
87     homepage = "https://juftin.com/browsr";
88     changelog = "https://github.com/juftin/browsr/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
89     license = licenses.mit;
90     maintainers = with maintainers; [ figsoda ];
91   };