nixpkgs/pkgs/applications/editors/jupyter/default.nix
natsukium 86eb3a994e 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.
2023-11-22 00:11:25 +01:00

18 lines
473 B
Nix

# Jupyter notebook with the given kernel definitions
{ python3
, jupyter-kernel
, definitions ? jupyter-kernel.default
}:
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
jupyter-notebook