File tree 2 files changed +8
-5
lines changed
example/Python/local-package
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
{ overlays ? [ ]
2
2
, config ? { }
3
3
, pkgs ? import ./nix { inherit config overlays ; }
4
- , extraPackages ? ( _ : [ ] )
5
4
} :
6
5
7
6
with ( import ./lib/directory.nix { inherit pkgs ; } ) ;
18
17
# Default configuration.
19
18
defaultDirectory = "${ python3 . jupyterlab } /share/jupyter/lab" ;
20
19
defaultKernels = [ ( kernels . iPythonWith { } ) ] ;
20
+ defaultExtraPackages = p : [ ] ;
21
21
22
22
# 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
+ } :
24
28
let
25
29
# PYTHONPATH setup for JupyterLab
26
30
pythonPath = python3 . makePythonPath [
Original file line number Diff line number Diff line change 1
1
let
2
2
jupyterLibPath = ../../.. ;
3
- jupyter = import jupyterLibPath {
4
- extraPackages = p : [ p . hello ] ;
5
- } ;
3
+ jupyter = import jupyterLibPath { } ;
6
4
7
5
iPythonWithPackages = jupyter . kernels . iPythonWith {
8
6
name = "local-package" ;
19
17
20
18
jupyterlabWithKernels = jupyter . jupyterlabWith {
21
19
kernels = [ iPythonWithPackages ] ;
20
+ extraPackages = p : [ p . hello ] ;
22
21
} ;
23
22
in
24
23
jupyterlabWithKernels . env
You can’t perform that action at this time.
0 commit comments