1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, fetchFromGitHub
6, pythonOlder
7, substituteAll
8, colorama
9, contourpy
10, jinja2
11, mock
12, numpy
13, nodejs
14, packaging
15, pandas
16, pillow
17, tornado
18, pytestCheckHook
19, pyyaml
20, setuptools
21, setuptools-git-versioning
22, xyzservices
23, beautifulsoup4
24, channels
25, click
26, colorcet
27, coverage
28, firefox
29, geckodriver
30, isort
31, json5
32, nbconvert
33, networkx
34, psutil
35, pygments
36, pygraphviz
37, pytest
38, pytest-asyncio
39, pytest-xdist
40, pytest-timeout
41, requests
42, scipy
43, selenium
44, toml
45, typing-extensions
46}:
47
48buildPythonPackage rec {
49 pname = "bokeh";
50 # update together with panel which is not straightforward
51 version = "3.2.2";
52 format = "pyproject";
53
54 disabled = pythonOlder "3.9";
55
56 src = fetchPypi {
57 inherit pname version;
58 hash = "sha256-spWbhSTWnsTniGvDZAdEXwqS4fGVMNO/xARSNqG3pv8=";
59 };
60
61 src_test = fetchFromGitHub {
62 owner = "bokeh";
63 repo = pname;
64 rev = "refs/tags/${version}";
65 hash = "sha256-PK9iLOCcivr4oF9Riq73dzxGfxzWRk3bdrCCpRrTv5g=";
66 };
67
68 patches = [
69 (substituteAll {
70 src = ./hardcode-nodejs-npmjs-paths.patch;
71 node_bin = "${nodejs}/bin/node";
72 npm_bin = "${nodejs}/bin/npm";
73 })
74 ];
75
76 nativeBuildInputs = [
77 colorama
78 nodejs
79 setuptools
80 setuptools-git-versioning
81 ];
82
83 nativeCheckInputs = [
84 pytestCheckHook
85 beautifulsoup4
86 channels
87 click
88 colorcet
89 coverage
90 firefox
91 geckodriver
92 isort
93 json5
94 nbconvert
95 networkx
96 psutil
97 pygments
98 pygraphviz
99 pytest
100 pytest-asyncio
101 pytest-xdist
102 pytest-timeout
103 requests
104 scipy
105 selenium
106 toml
107 typing-extensions
108 ];
109
110 propagatedBuildInputs = [
111 jinja2
112 contourpy
113 numpy
114 packaging
115 pandas
116 pillow
117 pyyaml
118 tornado
119 xyzservices
120 ];
121
122 doCheck = false; # need more work
123 pytestFlagsArray = "tests/test_defaults.py";
124 pythonImportsCheck = [ "bokeh" ];
125 preCheck = ''
126 cp -rv ''${src_test}/tests/* ./tests/
127 '';
128
129 meta = {
130 description = "Statistical and novel interactive HTML plots for Python";
131 homepage = "https://github.com/bokeh/bokeh";
132 license = lib.licenses.bsd3;
133 maintainers = with lib.maintainers; [ orivej ];
134 };
135}