Make mkIpythonKernel and mkJupyterShell proper functions

This commit is contained in:
Evie Litherland-Smith 2024-04-23 16:29:37 +01:00
parent 8c2d5aba60
commit eb2e035ba9
2 changed files with 4 additions and 4 deletions

View file

@ -18,8 +18,8 @@
packages.${system} = {
poetry2nix = poetry2nix.lib.mkPoetry2Nix {inherit pkgs;};
catppuccin_jupyterlab = import ./catppuccin_jupyterlab/default.nix;
mkIpythonKernel = import ./ipykernel.nix;
mkJupyterShell = import ./jupyter.nix;
mkIpythonKernel = attrs: (pkgs.callPackage ./ipykernel.nix attrs);
mkJupyterShell = attrs: (pkgs.callPackage ./jupyter.nix attrs);
default = self.packages.${system}.mkJupyterShell;
};
};

View file

@ -1,12 +1,12 @@
{
pkgs,
writeTextFile,
name,
pyenv,
...
}: let
interpreter = pyenv.interpreter; # TODO ensure ipykernel package installed somehow...
in
pkgs.writeTextFile {
writeTextFile {
name = "${name}-ipykernel";
destination = "/kernels/${name}/kernel.json";
text = builtins.toJSON {