2019-02-24 15:24:42 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, bokeh
|
|
|
|
, param
|
|
|
|
, pyviz-comms
|
|
|
|
, markdown
|
|
|
|
, pyct
|
|
|
|
, testpath
|
2020-04-24 11:08:41 +01:00
|
|
|
, tqdm
|
2021-04-07 15:21:08 +01:00
|
|
|
, callPackage
|
2019-02-24 15:24:42 +00:00
|
|
|
}:
|
|
|
|
|
2021-04-07 15:21:08 +01:00
|
|
|
let
|
|
|
|
node = callPackage ./node {};
|
|
|
|
in buildPythonPackage rec {
|
2019-02-24 15:24:42 +00:00
|
|
|
pname = "panel";
|
2021-04-24 10:16:47 +01:00
|
|
|
version = "0.11.3";
|
2019-02-24 15:24:42 +00:00
|
|
|
|
2021-04-07 15:21:08 +01:00
|
|
|
# Don't forget to also update the node packages
|
|
|
|
# 1. retrieve the package.json file
|
|
|
|
# 2. nix shell nixpkgs#nodePackages.node2nix
|
|
|
|
# 3. node2nix
|
2019-02-24 15:24:42 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-24 10:16:47 +01:00
|
|
|
sha256 = "sha256-HpHYHysPE6MRxR0kek5C7sunHMfBsUGdZfxamz2jcLc=";
|
2019-02-24 15:24:42 +00:00
|
|
|
};
|
|
|
|
|
2021-04-07 15:21:08 +01: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
|
|
|
|
'';
|
|
|
|
|
2019-02-24 15:24:42 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
bokeh
|
|
|
|
param
|
|
|
|
pyviz-comms
|
|
|
|
markdown
|
|
|
|
pyct
|
|
|
|
testpath
|
2020-04-24 11:08:41 +01:00
|
|
|
tqdm
|
2019-02-24 15:24:42 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# infinite recursion in test dependencies (hvplot)
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-04-07 15:21:08 +01:00
|
|
|
passthru = {
|
|
|
|
inherit node; # For convenience
|
|
|
|
};
|
|
|
|
|
2019-02-24 15:24:42 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A high level dashboarding library for python visualization libraries";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pyviz.org";
|
2019-02-24 15:24:42 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|