diff options
Diffstat (limited to 'pkgs/applications/editors/jupyter-kernels/iruby/default.nix')
-rw-r--r-- | pkgs/applications/editors/jupyter-kernels/iruby/default.nix | 47 |
1 files changed, 36 insertions, 11 deletions
diff --git a/pkgs/applications/editors/jupyter-kernels/iruby/default.nix b/pkgs/applications/editors/jupyter-kernels/iruby/default.nix index 260a614fe5c0..f456d469ca36 100644 --- a/pkgs/applications/editors/jupyter-kernels/iruby/default.nix +++ b/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 |