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} = { packages.${system} = {
poetry2nix = poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}; poetry2nix = poetry2nix.lib.mkPoetry2Nix {inherit pkgs;};
catppuccin_jupyterlab = import ./catppuccin_jupyterlab/default.nix; catppuccin_jupyterlab = import ./catppuccin_jupyterlab/default.nix;
mkIpythonKernel = import ./ipykernel.nix; mkIpythonKernel = attrs: (pkgs.callPackage ./ipykernel.nix attrs);
mkJupyterShell = import ./jupyter.nix; mkJupyterShell = attrs: (pkgs.callPackage ./jupyter.nix attrs);
default = self.packages.${system}.mkJupyterShell; default = self.packages.${system}.mkJupyterShell;
}; };
}; };

View file

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