diff --git a/pkgs/development/python-modules/textual-fastdatatable/default.nix b/pkgs/development/python-modules/textual-fastdatatable/default.nix index 421b43da8364..54f830cc85d3 100644 --- a/pkgs/development/python-modules/textual-fastdatatable/default.nix +++ b/pkgs/development/python-modules/textual-fastdatatable/default.nix @@ -1,13 +1,17 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, poetry-core, pyarrow, pytz, textual, tzdata, + pythonOlder, polars, + pytest-asyncio, + pytest-textual-snapshot, + pytestCheckHook, }: buildPythonPackage rec { @@ -15,36 +19,45 @@ buildPythonPackage rec { version = "0.10.0"; pyproject = true; - src = fetchPypi { - pname = "textual_fastdatatable"; - inherit version; - hash = "sha256-45uLpUzBb+xH+a+DIFiXB4YjabyFE4wmv1Tw3JtpNow="; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "tconbeer"; + repo = "textual-fastdatatable"; + rev = "refs/tags/v${version}"; + hash = "sha256-r1evN69etFn21TkXPLuAh1OxIsurDDyPyYOKQR5uUos="; }; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; dependencies = [ pyarrow pytz textual tzdata - ]; + ] ++ textual.optional-dependencies.syntax; optional-dependencies = { - polars = [ - polars - ]; + polars = [ polars ]; }; - pythonImportsCheck = [ - "textual_fastdatatable" + nativeCheckInputs = [ + pytest-asyncio + pytest-textual-snapshot + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues optional-dependencies); + + pythonImportsCheck = [ "textual_fastdatatable" ]; + + disabledTestPaths = [ + # Tests are comparing CLI output + "tests/snapshot_tests/test_snapshots.py" ]; meta = { description = "A performance-focused reimplementation of Textual's DataTable widget, with a pluggable data storage backend"; - homepage = "https://pypi.org/project/textual-fastdatatable/"; + homepage = "https://github.com/tconbeer/textual-fastdatatable"; + changelog = "https://github.com/tconbeer/textual-fastdatatable/releases/tag/v${version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pcboy ]; };