Skip to content

Commit d1a31a3

Browse files
authored
Merge pull request tweag#60 from tweag/extra-packages
change location of extraPackages parameter
2 parents 986e5f5 + 93ddca4 commit d1a31a3

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

default.nix

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{ overlays ? []
22
, config ? {}
33
, pkgs ? import ./nix { inherit config overlays; }
4-
, extraPackages ? (_: [])
54
}:
65

76
with (import ./lib/directory.nix { inherit pkgs; });
@@ -18,9 +17,14 @@ let
1817
# Default configuration.
1918
defaultDirectory = "${python3.jupyterlab}/share/jupyter/lab";
2019
defaultKernels = [ (kernels.iPythonWith {}) ];
20+
defaultExtraPackages = p: [];
2121

2222
# JupyterLab with the appropriate kernel and directory setup.
23-
jupyterlabWith = { directory ? defaultDirectory, kernels ? defaultKernels }:
23+
jupyterlabWith = {
24+
directory ? defaultDirectory,
25+
kernels ? defaultKernels,
26+
extraPackages ? defaultExtraPackages
27+
}:
2428
let
2529
# PYTHONPATH setup for JupyterLab
2630
pythonPath = python3.makePythonPath [

example/Python/local-package/shell.nix

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
let
22
jupyterLibPath = ../../..;
3-
jupyter = import jupyterLibPath {
4-
extraPackages = p: [p.hello];
5-
};
3+
jupyter = import jupyterLibPath {};
64

75
iPythonWithPackages = jupyter.kernels.iPythonWith {
86
name = "local-package";
@@ -19,6 +17,7 @@ let
1917

2018
jupyterlabWithKernels = jupyter.jupyterlabWith {
2119
kernels = [ iPythonWithPackages ];
20+
extraPackages = p: [p.hello];
2221
};
2322
in
2423
jupyterlabWithKernels.env

0 commit comments

Comments
 (0)