2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
jupyter-packaging,
|
|
|
|
jupyterlab,
|
|
|
|
bqscales,
|
|
|
|
ipywidgets,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
traitlets,
|
|
|
|
traittypes,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bqplot";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.12.43";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-8rRp0fA99PUYc8sEBqJLVs30qDX8WqlWB3b8Y2uLNEk=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# upstream seems in flux for 0.13 release. they seem to want to migrate from
|
|
|
|
# jupyter_packaging to hatch, so let's patch instead of fixing upstream
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "jupyter_packaging~=" "jupyter_packaging>=" \
|
|
|
|
--replace "jupyterlab~=" "jupyterlab>="
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
jupyter-packaging
|
2023-10-09 19:29:22 +00:00
|
|
|
jupyterlab
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bqscales
|
|
|
|
ipywidgets
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
traitlets
|
|
|
|
traittypes
|
|
|
|
];
|
|
|
|
|
|
|
|
# no tests in PyPI dist, and not obvious to me how to build the js files from GitHub
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bqplot"
|
|
|
|
"bqplot.pyplot"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "2D plotting library for Jupyter based on Grammar of Graphics";
|
|
|
|
homepage = "https://bqplot.github.io/bqplot";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|