diff options
Diffstat (limited to 'pkgs/development/python-modules/panel/default.nix')
-rw-r--r-- | pkgs/development/python-modules/panel/default.nix | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/pkgs/development/python-modules/panel/default.nix b/pkgs/development/python-modules/panel/default.nix index 8673c637eda..c5da10a30b0 100644 --- a/pkgs/development/python-modules/panel/default.nix +++ b/pkgs/development/python-modules/panel/default.nix @@ -9,40 +9,23 @@ , pyct , testpath , tqdm -, callPackage +, nodejs }: -let - node = callPackage ./node { }; -in buildPythonPackage rec { pname = "panel"; version = "0.12.6"; - # Don't forget to also update the node packages - # 1. retrieve the package.json file - # 2. nix shell nixpkgs#nodePackages.node2nix - # 3. node2nix + format = "wheel"; + + # We fetch a wheel because while we can fetch the node + # artifacts using npm, the bundling invoked in setup.py + # tries to fetch even more artifacts src = fetchPypi { - inherit pname version; - sha256 = "97e158e8eb941f88d71929407f9455c903b5e18d89969db8ce8af66036f46b53"; + inherit pname version format; + hash = "sha256-ARAbBM0QYZlZqV51lMRoEZEQH1jlHRhlon3nfTi7dnM="; }; - # 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 - ''; - propagatedBuildInputs = [ bleach bokeh @@ -58,7 +41,7 @@ buildPythonPackage rec { doCheck = false; passthru = { - inherit node; # For convenience + inherit nodejs; # For convenience }; meta = with lib; { |