nix-jupyter/ipykernel.nix

25 lines
499 B
Nix
Raw Normal View History

{
pkgs,
name,
pyenv,
...
}: let
interpreter = pyenv.interpreter; # TODO ensure ipykernel package installed somehow...
in
pkgs.writeTextFile {
name = "${name}-ipykernel";
destination = "/kernels/${name}/kernel.json";
text = builtins.toJSON {
display_name = name;
argv = [
"${interpreter}"
"-m"
"ipykernel_launcher"
"-f"
"{connection_file}"
];
language = "python";
metadata = {debugger = true;};
};
}