2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-09-18 10:52:07 +00:00
|
|
|
, bleach
|
2020-04-24 23:36:52 +00:00
|
|
|
, bokeh
|
|
|
|
, param
|
|
|
|
, pyviz-comms
|
|
|
|
, markdown
|
|
|
|
, pyct
|
|
|
|
, testpath
|
|
|
|
, tqdm
|
2021-04-12 18:23:04 +00:00
|
|
|
, callPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
let
|
2021-09-18 10:52:07 +00:00
|
|
|
node = callPackage ./node { };
|
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "panel";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.12.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
# Don't forget to also update the node packages
|
|
|
|
# 1. retrieve the package.json file
|
|
|
|
# 2. nix shell nixpkgs#nodePackages.node2nix
|
|
|
|
# 3. node2nix
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "e4898d60abdb82f8a429df7f59dbf8bcaf7e19b3e633555512ceb4ce06678458";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
# Since 0.10.0 panel attempts to fetch from the web.
|
|
|
|
# We avoid this:
|
|
|
|
# - we use node2nix to fetch assets
|
|
|
|
# - we disable bundling (which also tries to fetch assets)
|
|
|
|
# Downside of disabling bundling is that in an airgapped environment
|
|
|
|
# one may miss assets.
|
|
|
|
# https://github.com/holoviz/panel/issues/1819
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace setup.py --replace "bundle_resources()" ""
|
|
|
|
pushd panel
|
|
|
|
ln -s ${node.nodeDependencies}/lib/node_modules
|
|
|
|
export PATH="${node.nodeDependencies}/bin:$PATH"
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
bleach
|
2020-04-24 23:36:52 +00:00
|
|
|
bokeh
|
|
|
|
param
|
|
|
|
pyviz-comms
|
|
|
|
markdown
|
|
|
|
pyct
|
|
|
|
testpath
|
|
|
|
tqdm
|
|
|
|
];
|
|
|
|
|
|
|
|
# infinite recursion in test dependencies (hvplot)
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
passthru = {
|
|
|
|
inherit node; # For convenience
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A high level dashboarding library for python visualization libraries";
|
|
|
|
homepage = "https://pyviz.org";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|