at 24.05-pre 1.7 kB view raw
1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchPypi 5, pythonOlder 6, pythonRelaxDepsHook 7, altair 8, ipytablewidgets 9, ipywidgets 10, jupyter 11, jupyter-core 12, jupyterlab 13, pandas 14, poetry-core 15, pytestCheckHook 16}: 17 18buildPythonPackage rec { 19 pname = "vega"; 20 version = "4.0.0"; 21 format = "pyproject"; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-v1/8taHdN1n9+gy7L+g/wAJ2x9FwYCaxZiEdFqLct1Y="; 28 }; 29 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 ]; 38 39 nativeBuildInputs = [ 40 poetry-core 41 pythonRelaxDepsHook 42 ]; 43 44 pythonRelaxDeps = [ 45 "pandas" 46 ]; 47 48 propagatedBuildInputs = [ 49 ipytablewidgets 50 jupyter 51 jupyter-core 52 pandas 53 ]; 54 55 passthru.optional-dependencies = { 56 widget = [ 57 ipywidgets 58 ]; 59 jupyterlab = [ 60 jupyterlab 61 ]; 62 }; 63 64 nativeCheckInputs = [ 65 altair 66 pytestCheckHook 67 ]; 68 69 disabledTestPaths = [ 70 # these tests are broken with jupyter-notebook >= 7 71 "vega/tests/test_entrypoint.py" 72 ]; 73 74 pythonImportsCheck = [ "vega" ]; 75 76 meta = with lib; { 77 description = "An IPython/Jupyter widget for Vega and Vega-Lite"; 78 longDescription = '' 79 To use this you have to enter a nix-shell with vega. Then run: 80 81 jupyter nbextension install --user --py vega 82 jupyter nbextension enable --user vega 83 ''; 84 homepage = "https://github.com/vega/ipyvega"; 85 license = licenses.bsd3; 86 maintainers = with maintainers; [ teh ]; 87 }; 88}