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