From 359368f76ff02a7f7229f2104d66de7643017f2d Mon Sep 17 00:00:00 2001 From: Augustin Borsu Date: Thu, 11 Jan 2018 21:52:29 +0100 Subject: [PATCH] jupyter: init Top-level jupyter package that, given kernel definitions, can be used with various kernels. --- pkgs/applications/editors/jupyter/default.nix | 18 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/applications/editors/jupyter/default.nix diff --git a/pkgs/applications/editors/jupyter/default.nix b/pkgs/applications/editors/jupyter/default.nix new file mode 100644 index 00000000000..2bca120c1de --- /dev/null +++ b/pkgs/applications/editors/jupyter/default.nix @@ -0,0 +1,18 @@ +# Jupyter notebook with the given kernel definitions + +{ python3 +, jupyter-kernel +, definitions ? jupyter-kernel.default +}: + +let + + jupyterPath = (jupyter-kernel.create { inherit definitions; }); + +in + +with python3.pkgs; toPythonModule ( + notebook.overridePythonAttrs(oldAttrs: { + makeWrapperArgs = ["--set JUPYTER_PATH ${jupyterPath}"]; + }) +) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 472155ac265..4d2bf622e44 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3383,6 +3383,8 @@ with pkgs; jupp = callPackage ../applications/editors/jupp { }; + jupyter = callPackage ../applications/editors/jupyter { }; + jupyter-kernel = callPackage ../applications/editors/jupyter/kernel.nix { }; jwhois = callPackage ../tools/networking/jwhois { };