nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 altair,
6 ipytablewidgets,
7 ipywidgets,
8 jupyter,
9 jupyter-core,
10 jupyterlab,
11 pandas,
12 poetry-core,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "vega";
18 version = "4.1.0";
19 pyproject = true;
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-8lrmhCvwczqBpiQRCkPjmiYsJPHEFnZab/Azkh+i7ls=";
24 };
25
26 nativeBuildInputs = [
27 poetry-core
28 ];
29
30 pythonRelaxDeps = [ "pandas" ];
31
32 propagatedBuildInputs = [
33 ipytablewidgets
34 jupyter
35 jupyter-core
36 pandas
37 ];
38
39 optional-dependencies = {
40 widget = [ ipywidgets ];
41 jupyterlab = [ jupyterlab ];
42 };
43
44 nativeCheckInputs = [
45 altair
46 pytestCheckHook
47 ];
48
49 disabledTestPaths = [
50 # these tests are broken with jupyter-notebook >= 7
51 "vega/tests/test_entrypoint.py"
52 ];
53
54 pythonImportsCheck = [ "vega" ];
55
56 meta = {
57 description = "IPython/Jupyter widget for Vega and Vega-Lite";
58 longDescription = ''
59 To use this you have to enter a nix-shell with vega. Then run:
60
61 jupyter nbextension install --user --py vega
62 jupyter nbextension enable --user vega
63 '';
64 homepage = "https://github.com/vega/ipyvega";
65 license = lib.licenses.bsd3;
66 maintainers = with lib.maintainers; [ teh ];
67 };
68}