1{ lib
2, buildPythonPackage
3, fetchPypi
4, bokeh
5, param
6, pyviz-comms
7, markdown
8, pyct
9, testpath
10, tqdm
11, callPackage
12}:
13
14let
15 node = callPackage ./node {};
16in buildPythonPackage rec {
17 pname = "panel";
18 version = "0.11.3";
19
20 # Don't forget to also update the node packages
21 # 1. retrieve the package.json file
22 # 2. nix shell nixpkgs#nodePackages.node2nix
23 # 3. node2nix
24 src = fetchPypi {
25 inherit pname version;
26 sha256 = "sha256-HpHYHysPE6MRxR0kek5C7sunHMfBsUGdZfxamz2jcLc=";
27 };
28
29 # Since 0.10.0 panel attempts to fetch from the web.
30 # We avoid this:
31 # - we use node2nix to fetch assets
32 # - we disable bundling (which also tries to fetch assets)
33 # Downside of disabling bundling is that in an airgapped environment
34 # one may miss assets.
35 # https://github.com/holoviz/panel/issues/1819
36 preBuild = ''
37 substituteInPlace setup.py --replace "bundle_resources()" ""
38 pushd panel
39 ln -s ${node.nodeDependencies}/lib/node_modules
40 export PATH="${node.nodeDependencies}/bin:$PATH"
41 popd
42 '';
43
44 propagatedBuildInputs = [
45 bokeh
46 param
47 pyviz-comms
48 markdown
49 pyct
50 testpath
51 tqdm
52 ];
53
54 # infinite recursion in test dependencies (hvplot)
55 doCheck = false;
56
57 passthru = {
58 inherit node; # For convenience
59 };
60
61 meta = with lib; {
62 description = "A high level dashboarding library for python visualization libraries";
63 homepage = "https://pyviz.org";
64 license = licenses.bsd3;
65 maintainers = [ maintainers.costrouc ];
66 };
67}