biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / vega / default.nix
blob1acb25ddf809481d8241765a232016162f084bab
2   lib,
3   buildPythonPackage,
4   fetchpatch,
5   fetchPypi,
6   pythonOlder,
7   altair,
8   ipytablewidgets,
9   ipywidgets,
10   jupyter,
11   jupyter-core,
12   jupyterlab,
13   pandas,
14   poetry-core,
15   pytestCheckHook,
18 buildPythonPackage rec {
19   pname = "vega";
20   version = "4.0.0";
21   format = "pyproject";
23   disabled = pythonOlder "3.8";
25   src = fetchPypi {
26     inherit pname version;
27     hash = "sha256-v1/8taHdN1n9+gy7L+g/wAJ2x9FwYCaxZiEdFqLct1Y=";
28   };
30   patches = [
31     # https://github.com/vega/ipyvega/pull/507
32     (fetchpatch {
33       name = "replace-poetry-with-poetry-core.patch";
34       url = "https://github.com/vega/ipyvega/commit/1a5028ee5d54e24b9650b66685f54c42b72c7899.patch";
35       hash = "sha256-W8UmMit7DJGKCM9+/OSRLTuRvC0ZR42AP/b/frVEvsk=";
36     })
37   ];
39   nativeBuildInputs = [
40     poetry-core
41   ];
43   pythonRelaxDeps = [ "pandas" ];
45   propagatedBuildInputs = [
46     ipytablewidgets
47     jupyter
48     jupyter-core
49     pandas
50   ];
52   optional-dependencies = {
53     widget = [ ipywidgets ];
54     jupyterlab = [ jupyterlab ];
55   };
57   nativeCheckInputs = [
58     altair
59     pytestCheckHook
60   ];
62   disabledTestPaths = [
63     # these tests are broken with jupyter-notebook >= 7
64     "vega/tests/test_entrypoint.py"
65   ];
67   pythonImportsCheck = [ "vega" ];
69   meta = with lib; {
70     description = "IPython/Jupyter widget for Vega and Vega-Lite";
71     longDescription = ''
72       To use this you have to enter a nix-shell with vega. Then run:
74       jupyter nbextension install --user --py vega
75       jupyter nbextension enable --user vega
76     '';
77     homepage = "https://github.com/vega/ipyvega";
78     license = licenses.bsd3;
79     maintainers = with maintainers; [ teh ];
80   };