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:
parent
5230b3c635
commit
8c2d5aba60
35
jupyter.nix
35
jupyter.nix
|
@ -1,20 +1,25 @@
|
|||
{
|
||||
pkgs,
|
||||
kernel,
|
||||
python ? pkgs.python3,
|
||||
mkShellNoCC,
|
||||
python3,
|
||||
kernels ? [],
|
||||
extraPackages ? (ps: []),
|
||||
}:
|
||||
pkgs.mkShellNoCC {
|
||||
mkShellNoCC {
|
||||
nativeBuildInputs = [
|
||||
(python.withPackages (ps:
|
||||
with ps; [
|
||||
jupyterlab
|
||||
jupyterlab-git
|
||||
nbdime
|
||||
nbconvert
|
||||
(ps.callPackage ./catppuccin_jupyterlab {})
|
||||
]))
|
||||
(python3.withPackages (ps:
|
||||
with ps;
|
||||
[
|
||||
jupyterlab
|
||||
jupyterlab-git
|
||||
nbdime
|
||||
nbconvert
|
||||
python-lsp-server
|
||||
(ps.callPackage ./catppuccin_jupyterlab {})
|
||||
]
|
||||
++ (extraPackages ps)))
|
||||
];
|
||||
shellHook = ''
|
||||
export JUPYTER_PATH=${kernel}
|
||||
'';
|
||||
shellHook = with builtins; let
|
||||
kernelString = foldl' (x: y: ":" + (toString y) + x) "" kernels;
|
||||
pathString = substring 1 (stringLength kernelString) kernelString;
|
||||
in "export JUPYTER_PATH=${pathString}";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue