From 83bd47a835f90e8488c7ef1234ae1d876789abcb Mon Sep 17 00:00:00 2001 From: Matthew Kenigsberg Date: Tue, 10 Sep 2024 13:50:08 -0600 Subject: [PATCH] jupyter: respect JUPYTER_PATH JUPYTER_PATH can be used to provide additional plugins for jupyter to use. Currently, JUPYTER_PATH is being unconditionally overridden, so extensions are not found, e.g: ``` $ JUPYTER_PATH="path to dir with labextensions/@jupyter-widgets" jupyter labextension list 2>&1 | grep widgets ``` Instead of setting JUPYTER_PATH, prepend to it, so JUPYTER_PATH will be respected: ``` $ JUPYTER_PATH="path to dir with labextensions/@jupyter-widgets" jupyter labextension list 2>&1 | grep widgets @jupyter-widgets/jupyterlab-manager v5.0.13 enabled OK (python, jupyterlab_widgets) ``` --- pkgs/applications/editors/jupyter/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/jupyter/default.nix b/pkgs/applications/editors/jupyter/default.nix index 57122d173a44..08c33982364d 100644 --- a/pkgs/applications/editors/jupyter/default.nix +++ b/pkgs/applications/editors/jupyter/default.nix @@ -9,7 +9,7 @@ let jupyterPath = (jupyter-kernel.create { inherit definitions; }); jupyter-notebook = (python3.buildEnv.override { extraLibs = [ python3.pkgs.notebook ]; - makeWrapperArgs = ["--set JUPYTER_PATH ${jupyterPath}"]; + makeWrapperArgs = ["--prefix JUPYTER_PATH : ${jupyterPath}"]; }).overrideAttrs(oldAttrs: { meta = oldAttrs.meta // { mainProgram = "jupyter-notebook"; }; });