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 ] ++ textual.optional-dependencies.syntax;
39
40 optional-dependencies = {
41 polars = [ polars ];
42 };
43
44 nativeCheckInputs = [
45 pytest-asyncio
46 pytest-textual-snapshot
47 pytestCheckHook
48 ] ++ lib.flatten (builtins.attrValues optional-dependencies);
49
50 pythonImportsCheck = [ "textual_fastdatatable" ];
51
52 disabledTestPaths = [
53 # Tests are comparing CLI output
54 "tests/snapshot_tests/test_snapshots.py"
55 ];
56
57 meta = {
58 description = "A performance-focused reimplementation of Textual's DataTable widget, with a pluggable data storage backend";
59 homepage = "https://github.com/tconbeer/textual-fastdatatable";
60 changelog = "https://github.com/tconbeer/textual-fastdatatable/releases/tag/${src.tag}";
61 license = lib.licenses.mit;
62 maintainers = with lib.maintainers; [ pcboy ];
63 };
64}