2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, altair
|
|
|
|
, ipytablewidgets
|
|
|
|
, ipywidgets
|
|
|
|
, jupyter
|
|
|
|
, jupyter-core
|
|
|
|
, jupyterlab
|
|
|
|
, pandas
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
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=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "poetry.masonry.api" "poetry.core.masonry.api"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"pandas"
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ipytablewidgets
|
|
|
|
jupyter
|
|
|
|
jupyter-core
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
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; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An IPython/Jupyter widget for Vega and Vega-Lite";
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|