2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchpatch,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
altair,
|
|
|
|
ipytablewidgets,
|
|
|
|
ipywidgets,
|
|
|
|
jupyter,
|
|
|
|
jupyter-core,
|
|
|
|
jupyterlab,
|
|
|
|
pandas,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vega";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "4.0.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-v1/8taHdN1n9+gy7L+g/wAJ2x9FwYCaxZiEdFqLct1Y=";
|
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/vega/ipyvega/pull/507
|
|
|
|
(fetchpatch {
|
|
|
|
name = "replace-poetry-with-poetry-core.patch";
|
|
|
|
url = "https://github.com/vega/ipyvega/commit/1a5028ee5d54e24b9650b66685f54c42b72c7899.patch";
|
|
|
|
hash = "sha256-W8UmMit7DJGKCM9+/OSRLTuRvC0ZR42AP/b/frVEvsk=";
|
|
|
|
})
|
|
|
|
];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "pandas" ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ipytablewidgets
|
|
|
|
jupyter
|
|
|
|
jupyter-core
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
widget = [ ipywidgets ];
|
|
|
|
jupyterlab = [ jupyterlab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
altair
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# these tests are broken with jupyter-notebook >= 7
|
|
|
|
"vega/tests/test_entrypoint.py"
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
pythonImportsCheck = [ "vega" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "IPython/Jupyter widget for Vega and Vega-Lite";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
To use this you have to enter a nix-shell with vega. Then run:
|
|
|
|
|
|
|
|
jupyter nbextension install --user --py vega
|
|
|
|
jupyter nbextension enable --user vega
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/vega/ipyvega";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ teh ];
|
|
|
|
};
|
|
|
|
}
|