1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pyarrow,
7 pytz,
8 textual,
9 tzdata,
10 pythonOlder,
11 polars,
12 pytest-asyncio,
13 pytest-textual-snapshot,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "textual-fastdatatable";
19 version = "0.12.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "tconbeer";
26 repo = "textual-fastdatatable";
27 tag = "v${version}";
28 hash = "sha256-aQduVFHsdAMwjJzFPqOGB5Ec16YZ9YOYnEK6Ilf96xM=";
29 };
30
31 build-system = [ poetry-core ];
32
33 dependencies = [
34 pyarrow
35 pytz
36 textual
37 tzdata
38 ]
39 ++ textual.optional-dependencies.syntax;
40
41 optional-dependencies = {
42 polars = [ polars ];
43 };
44
45 nativeCheckInputs = [
46 pytest-asyncio
47 pytest-textual-snapshot
48 pytestCheckHook
49 ]
50 ++ lib.flatten (builtins.attrValues optional-dependencies);
51
52 pythonImportsCheck = [ "textual_fastdatatable" ];
53
54 disabledTestPaths = [
55 # Tests are comparing CLI output
56 "tests/snapshot_tests/test_snapshots.py"
57 ];
58
59 meta = {
60 description = "Performance-focused reimplementation of Textual's DataTable widget, with a pluggable data storage backend";
61 homepage = "https://github.com/tconbeer/textual-fastdatatable";
62 changelog = "https://github.com/tconbeer/textual-fastdatatable/releases/tag/${src.tag}";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [ pcboy ];
65 };
66}