Change kernel to be accept a list of kernels

List of kernel paths are formatted into JUPYTER_PATH environment
variable
This commit is contained in:
Evie Litherland-Smith 2024-04-23 15:57:59 +01:00
parent 5230b3c635
commit 8c2d5aba60

View file

@ -1,20 +1,25 @@
{ {
pkgs, mkShellNoCC,
kernel, python3,
python ? pkgs.python3, kernels ? [],
extraPackages ? (ps: []),
}: }:
pkgs.mkShellNoCC { mkShellNoCC {
nativeBuildInputs = [ nativeBuildInputs = [
(python.withPackages (ps: (python3.withPackages (ps:
with ps; [ with ps;
jupyterlab [
jupyterlab-git jupyterlab
nbdime jupyterlab-git
nbconvert nbdime
(ps.callPackage ./catppuccin_jupyterlab {}) nbconvert
])) python-lsp-server
(ps.callPackage ./catppuccin_jupyterlab {})
]
++ (extraPackages ps)))
]; ];
shellHook = '' shellHook = with builtins; let
export JUPYTER_PATH=${kernel} kernelString = foldl' (x: y: ":" + (toString y) + x) "" kernels;
''; pathString = substring 1 (stringLength kernelString) kernelString;
in "export JUPYTER_PATH=${pathString}";
} }