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