diff --git a/pkgs/development/python-modules/textnets/default.nix b/pkgs/development/python-modules/textnets/default.nix index 00b1ea7b6244..2db378b5a0f5 100644 --- a/pkgs/development/python-modules/textnets/default.nix +++ b/pkgs/development/python-modules/textnets/default.nix @@ -1,24 +1,30 @@ { lib, + stdenv, buildPythonPackage, - cairocffi, - cython, - en_core_web_sm, fetchFromGitHub, + + # build-system + cython, + poetry-core, + setuptools, + + # dependencies + cairocffi, igraph, leidenalg, pandas, - poetry-core, pyarrow, - pytestCheckHook, - pythonOlder, scipy, - setuptools, - spacy-lookups-data, spacy, + spacy-lookups-data, toolz, tqdm, wasabi, + + # tests + en_core_web_sm, + pytestCheckHook, }: buildPythonPackage rec { @@ -26,8 +32,6 @@ buildPythonPackage rec { version = "0.9.5"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "jboynyc"; repo = "textnets"; @@ -63,8 +67,8 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - pytestCheckHook en_core_web_sm + pytestCheckHook ]; pythonImportsCheck = [ "textnets" ]; @@ -74,16 +78,25 @@ buildPythonPackage rec { rm -r textnets ''; - disabledTests = [ - # Test fails: Throws a UserWarning asking the user to install `textnets[fca]`. - "test_context" - ]; + disabledTests = + [ + # Test fails: Throws a UserWarning asking the user to install `textnets[fca]`. + "test_context" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # MemoryError: ("cairo returned CAIRO_STATUS_NO_MEMORY: b'out of memory'", 1) + "test_plot_backbone" + "test_plot_filtered" + "test_plot_layout" + "test_plot_projected" + "test_plot_scaled" + ]; - meta = with lib; { + meta = { description = "Text analysis with networks"; homepage = "https://textnets.readthedocs.io"; changelog = "https://github.com/jboynyc/textnets/blob/v${version}/HISTORY.rst"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ jboy ]; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ jboy ]; }; }