diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/jupyter-kernels')
4 files changed, 52 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/applications/editors/jupyter-kernels/clojupyter/default.nix b/nixpkgs/pkgs/applications/editors/jupyter-kernels/clojupyter/default.nix index 504d41768868..5acca288f963 100644 --- a/nixpkgs/pkgs/applications/editors/jupyter-kernels/clojupyter/default.nix +++ b/nixpkgs/pkgs/applications/editors/jupyter-kernels/clojupyter/default.nix @@ -8,8 +8,11 @@ , imagemagick }: -# To test: -# $(nix-build --no-out-link -E 'with import <nixpkgs> {}; jupyter.override { definitions = { clojure = clojupyter.definition; }; }')/bin/jupyter-notebook +# Jupyter console: +# nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel clojupyter.definition' + +# Jupyter notebook: +# nix run --impure --expr 'with import <nixpkgs> {}; jupyter.override { definitions.clojure = clojupyter.definition; }' let cljdeps = import ./deps.nix { inherit pkgs; }; diff --git a/nixpkgs/pkgs/applications/editors/jupyter-kernels/iruby/default.nix b/nixpkgs/pkgs/applications/editors/jupyter-kernels/iruby/default.nix index 260a614fe5c0..f456d469ca36 100644 --- a/nixpkgs/pkgs/applications/editors/jupyter-kernels/iruby/default.nix +++ b/nixpkgs/pkgs/applications/editors/jupyter-kernels/iruby/default.nix @@ -2,16 +2,41 @@ , bundlerApp }: -bundlerApp { - pname = "iruby"; - gemdir = ./.; - exes = [ "iruby" ]; +# Jupyter console: +# nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel iruby.definition' - meta = with lib; { - description = "Ruby kernel for Jupyter"; - homepage = "https://github.com/SciRuby/iruby"; - license = licenses.mit; - maintainers = [ maintainers.costrouc ]; - platforms = platforms.unix; +# Jupyter notebook: +# nix run --impure --expr 'with import <nixpkgs> {}; jupyter.override { definitions.iruby = iruby.definition; }' + +let + self = bundlerApp { + pname = "iruby"; + gemdir = ./.; + exes = [ "iruby" ]; + + passthru = { + definition = { + displayName = "IRuby"; + argv = [ + "${self}/bin/iruby" + "kernel" + "{connection_file}" + ]; + language = "ruby"; + logo32 = null; + logo64 = null; + }; + }; + + meta = { + description = "Ruby kernel for Jupyter"; + homepage = "https://github.com/SciRuby/iruby"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ costrouc thomasjm ]; + platforms = lib.platforms.unix; + }; }; -} + +in + +self diff --git a/nixpkgs/pkgs/applications/editors/jupyter-kernels/octave/default.nix b/nixpkgs/pkgs/applications/editors/jupyter-kernels/octave/default.nix index a9770a5c1bef..88bc1b2803bb 100644 --- a/nixpkgs/pkgs/applications/editors/jupyter-kernels/octave/default.nix +++ b/nixpkgs/pkgs/applications/editors/jupyter-kernels/octave/default.nix @@ -7,8 +7,11 @@ , python3 }: -# To test: -# $(nix-build -E 'with import <nixpkgs> {}; jupyter.override { definitions = { octave = octave-kernel.definition; }; }')/bin/jupyter-notebook +# Jupyter console: +# nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel octave-kernel.definition' + +# Jupyter notebook: +# nix run --impure --expr 'with import <nixpkgs> {}; jupyter.override { definitions.octave = octave-kernel.definition; }' let kernel = callPackage ./kernel.nix { diff --git a/nixpkgs/pkgs/applications/editors/jupyter-kernels/wolfram/default.nix b/nixpkgs/pkgs/applications/editors/jupyter-kernels/wolfram/default.nix index 2d00d6e1fc2e..efa78f74bc96 100644 --- a/nixpkgs/pkgs/applications/editors/jupyter-kernels/wolfram/default.nix +++ b/nixpkgs/pkgs/applications/editors/jupyter-kernels/wolfram/default.nix @@ -2,8 +2,12 @@ , wolfram-engine }: -# To test: -# $(nix-build -E 'with import ./. {}; jupyter.override { definitions = { wolfram = wolfram-for-jupyter-kernel.definition; }; }')/bin/jupyter-notebook +# Jupyter console: +# nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel wolfram-for-jupyter-kernel.definition' + +# Jupyter notebook: +# nix run --impure --expr 'with import <nixpkgs> {}; jupyter.override { definitions.wolfram = wolfram-for-jupyter-kernel.definition; }' + let kernel = callPackage ./kernel.nix {}; in { definition = { |