Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a091844715e8
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3d9c143b772c
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Jul 7, 2020

  1. Copy the full SHA
    80a7a42 View commit details
  2. evcxr: wrap evcxr_jupyter binary

    evcxr_jupyter needs the same wrapper as the main binary to work.
    kristoff3r committed Jul 7, 2020
    Copy the full SHA
    a8b68fc View commit details

Commits on Jul 11, 2020

  1. Merge pull request #91895 from kristoff3r/jupyter-service

    Improve jupyter service
    Ma27 authored Jul 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3d9c143 View commit details
Showing with 24 additions and 5 deletions.
  1. +23 −5 nixos/modules/services/development/jupyter/default.nix
  2. +1 −0 pkgs/development/interpreters/evcxr/default.nix
28 changes: 23 additions & 5 deletions nixos/modules/services/development/jupyter/default.nix
Original file line number Diff line number Diff line change
@@ -6,10 +6,7 @@ let

cfg = config.services.jupyter;

# NOTE: We don't use top-level jupyter because we don't
# want to pass in JUPYTER_PATH but use .environment instead,
# saving a rebuild.
package = pkgs.python3.pkgs.notebook;
package = cfg.package;

kernels = (pkgs.jupyter-kernel.create {
definitions = if cfg.kernels != null
@@ -37,6 +34,27 @@ in {
'';
};

package = mkOption {
type = types.package;
# NOTE: We don't use top-level jupyter because we don't
# want to pass in JUPYTER_PATH but use .environment instead,
# saving a rebuild.
default = pkgs.python3.pkgs.notebook;
description = ''
Jupyter package to use.
'';
};

command = mkOption {
type = types.str;
default = "jupyter-notebook";
example = "jupyter-lab";
description = ''
Which command the service runs. Note that not all jupyter packages
have all commands, e.g. jupyter-lab isn't present in the default package.
'';
};

port = mkOption {
type = types.int;
default = 8888;
@@ -157,7 +175,7 @@ in {

serviceConfig = {
Restart = "always";
ExecStart = ''${package}/bin/jupyter-notebook \
ExecStart = ''${package}/bin/${cfg.command} \
--no-browser \
--ip=${cfg.ip} \
--port=${toString cfg.port} --port-retries 0 \
1 change: 1 addition & 0 deletions pkgs/development/interpreters/evcxr/default.nix
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ rustPlatform.buildRustPackage rec {
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
postInstall = ''
wrapProgram $out/bin/evcxr --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
wrapProgram $out/bin/evcxr_jupyter --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
rm $out/bin/testing_runtime
'';