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