From 86eb3a994ed6f101ed4b3c19025e8133423bcca8 Mon Sep 17 00:00:00 2001 From: natsukium Date: Fri, 17 Nov 2023 19:04:39 +0900 Subject: [PATCH] jupyter: fix runtime error fixed a bug reported in https://github.com/NixOS/nixpkgs/issues/255923 it occurred because the python runtime environment did not include the jupyter share, etc directories. --- pkgs/applications/editors/jupyter/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/editors/jupyter/default.nix b/pkgs/applications/editors/jupyter/default.nix index 2bca120c1deb..57122d173a44 100644 --- a/pkgs/applications/editors/jupyter/default.nix +++ b/pkgs/applications/editors/jupyter/default.nix @@ -6,13 +6,13 @@ }: let - jupyterPath = (jupyter-kernel.create { inherit definitions; }); - + jupyter-notebook = (python3.buildEnv.override { + extraLibs = [ python3.pkgs.notebook ]; + makeWrapperArgs = ["--set JUPYTER_PATH ${jupyterPath}"]; + }).overrideAttrs(oldAttrs: { + meta = oldAttrs.meta // { mainProgram = "jupyter-notebook"; }; + }); in -with python3.pkgs; toPythonModule ( - notebook.overridePythonAttrs(oldAttrs: { - makeWrapperArgs = ["--set JUPYTER_PATH ${jupyterPath}"]; - }) -) +jupyter-notebook