2023-05-31 13:31:36 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, extras ? [ "all" ]
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "browsr";
|
2024-03-10 20:22:38 +00:00
|
|
|
version = "1.19.0";
|
2024-02-13 10:54:00 +00:00
|
|
|
pyproject = true;
|
2023-05-31 13:31:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "juftin";
|
|
|
|
repo = "browsr";
|
2024-02-13 10:54:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-03-10 20:22:38 +00:00
|
|
|
hash = "sha256-V5B+/zfUlpF0TMTHqzyjapW93/DoJKgbJkTMX2NZyIQ=";
|
2023-05-31 13:31:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
hatchling
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
art
|
|
|
|
click
|
|
|
|
pandas
|
|
|
|
pillow
|
|
|
|
pymupdf
|
2024-03-10 20:22:38 +00:00
|
|
|
pyperclip
|
2023-05-31 13:31:36 +00:00
|
|
|
rich
|
|
|
|
rich-click
|
|
|
|
rich-pixels
|
|
|
|
textual
|
2023-06-21 20:04:49 +00:00
|
|
|
textual-universal-directorytree
|
2023-05-31 13:31:36 +00:00
|
|
|
] ++ lib.attrVals extras passthru.optional-dependencies;
|
|
|
|
|
|
|
|
passthru.optional-dependencies = with python3.pkgs; {
|
|
|
|
all = [
|
|
|
|
pyarrow
|
2023-06-21 20:04:49 +00:00
|
|
|
textual-universal-directorytree.optional-dependencies.remote
|
2023-05-31 13:31:36 +00:00
|
|
|
];
|
|
|
|
parquet = [
|
|
|
|
pyarrow
|
|
|
|
];
|
|
|
|
remote = [
|
2023-06-21 20:04:49 +00:00
|
|
|
textual-universal-directorytree.optional-dependencies.remote
|
2023-05-31 13:31:36 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-02-13 10:54:00 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
|
|
pytest-textual-snapshot
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-05-31 13:31:36 +00:00
|
|
|
pythonRelaxDeps = [
|
2023-06-14 17:02:06 +00:00
|
|
|
"art"
|
2023-08-23 15:36:24 +00:00
|
|
|
"pandas"
|
2023-05-31 13:31:36 +00:00
|
|
|
"pymupdf"
|
|
|
|
"rich-click"
|
2024-02-13 10:54:00 +00:00
|
|
|
"rich-pixels"
|
|
|
|
"rich"
|
2023-05-31 13:31:36 +00:00
|
|
|
"textual"
|
|
|
|
];
|
|
|
|
|
2024-02-13 10:54:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"browsr"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--snapshot-update"
|
|
|
|
];
|
2023-05-31 13:31:36 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
2024-02-13 10:54:00 +00:00
|
|
|
# Tests require internet access
|
2023-05-31 13:31:36 +00:00
|
|
|
"test_github_screenshot"
|
|
|
|
"test_github_screenshot_license"
|
|
|
|
"test_textual_app_context_path_github"
|
2024-03-10 20:22:38 +00:00
|
|
|
"test_mkdocs_screenshot"
|
|
|
|
# Different output
|
|
|
|
"test_textual_app_context_path"
|
2023-05-31 13:31:36 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A file explorer in your terminal";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "browsr";
|
2023-06-21 20:04:49 +00:00
|
|
|
homepage = "https://juftin.com/browsr";
|
|
|
|
changelog = "https://github.com/juftin/browsr/releases/tag/${src.rev}";
|
2023-05-31 13:31:36 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|