mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
Merge pull request #329905 from scvalex/livebook-without-cookie
livebook: fix service not starting when LIVEBOOK_COOKIE was not set
This commit is contained in:
commit
60bee661ea
|
@ -18222,6 +18222,12 @@
|
|||
githubId = 11587657;
|
||||
keys = [ { fingerprint = "E173 237A C782 296D 98F5 ADAC E13D FD4B 4712 7951"; } ];
|
||||
};
|
||||
scvalex = {
|
||||
name = "Alexandru Scvorțov";
|
||||
email = "github@abstractbinary.org";
|
||||
github = "scvalex";
|
||||
githubId = 2588;
|
||||
};
|
||||
sdaqo = {
|
||||
name = "sdaqo";
|
||||
email = "sdaqo.dev@protonmail.com";
|
||||
|
|
|
@ -89,6 +89,13 @@ in
|
|||
EnvironmentFile = cfg.environmentFile;
|
||||
ExecStart = "${cfg.package}/bin/livebook start";
|
||||
KillMode = "mixed";
|
||||
|
||||
# Fix for the issue described here:
|
||||
# https://github.com/livebook-dev/livebook/issues/2691
|
||||
#
|
||||
# Without this, the livebook service fails to start and gets
|
||||
# stuck running a `cat /dev/urandom | tr | fold` pipeline.
|
||||
IgnoreSIGPIPE = false;
|
||||
};
|
||||
environment = mapAttrs (name: value:
|
||||
if isBool value then boolToString value else toString value)
|
||||
|
@ -98,5 +105,8 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
meta.doc = ./livebook.md;
|
||||
meta = {
|
||||
doc = ./livebook.md;
|
||||
maintainers = with lib.maintainers; [ munksgaard scvalex ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,9 +11,6 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
|||
enableUserService = true;
|
||||
environment = {
|
||||
LIVEBOOK_PORT = 20123;
|
||||
LIVEBOOK_COOKIE = "chocolate chip";
|
||||
LIVEBOOK_TOKEN_ENABLED = true;
|
||||
|
||||
};
|
||||
environmentFile = pkgs.writeText "livebook.env" ''
|
||||
LIVEBOOK_PASSWORD = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
@ -38,7 +35,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
|||
|
||||
machine.succeed("loginctl enable-linger alice")
|
||||
machine.wait_until_succeeds("${sudo} systemctl --user is-active livebook.service")
|
||||
machine.wait_for_open_port(20123)
|
||||
machine.wait_for_open_port(20123, timeout=10)
|
||||
|
||||
machine.succeed("curl -L localhost:20123 | grep 'Type password'")
|
||||
'';
|
||||
|
|
|
@ -36,7 +36,7 @@ beamPackages.mixRelease rec {
|
|||
license = licenses.asl20;
|
||||
homepage = "https://livebook.dev/";
|
||||
description = "Automate code & data workflows with interactive Elixir notebooks";
|
||||
maintainers = with maintainers; [ munksgaard ];
|
||||
maintainers = with maintainers; [ munksgaard scvalex ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue