···
1
-
import ./make-test-python.nix (
4
-
name = "emacs-daemon";
5
-
meta = with pkgs.lib.maintainers; {
3
+
name = "emacs-daemon";
4
+
meta.maintainers = lib.teams.emacs.members;
15
-
imports = [ ./common/x11.nix ];
18
-
defaultEditor = true;
12
+
imports = [ ./common/x11.nix ];
15
+
defaultEditor = true;
21
-
# Important to get the systemd service running for root
22
-
environment.variables.XDG_RUNTIME_DIR = "/run/user/0";
18
+
# Important to get the systemd service running for root
19
+
environment.variables.XDG_RUNTIME_DIR = "/run/user/0";
24
-
environment.variables.TEST_SYSTEM_VARIABLE = "system variable";
21
+
environment.variables.TEST_SYSTEM_VARIABLE = "system variable";
28
-
machine.wait_for_unit("multi-user.target")
25
+
machine.wait_for_unit("multi-user.target")
30
-
# checks that the EDITOR environment variable is set
31
-
machine.succeed('test $(basename "$EDITOR") = emacseditor')
27
+
# checks that the EDITOR environment variable is set
28
+
machine.succeed('test $(basename "$EDITOR") = emacseditor')
33
-
# waits for the emacs service to be ready
34
-
machine.wait_until_succeeds(
35
-
"systemctl --user status emacs.service | grep 'Active: active'"
30
+
# waits for the emacs service to be ready
31
+
machine.wait_until_succeeds(
32
+
"systemctl --user status emacs.service | grep 'Active: active'"
38
-
# connects to the daemon
39
-
machine.succeed("emacsclient --no-wait --frame-parameters='((display . \"'\"$DISPLAY\"'\"))' --create-frame $EDITOR >&2")
35
+
# connects to the daemon
36
+
machine.succeed("emacsclient --no-wait --frame-parameters='((display . \"'\"$DISPLAY\"'\"))' --create-frame $EDITOR >&2")
41
-
# checks that Emacs shows the edited filename
42
-
machine.wait_for_text("emacseditor")
38
+
# checks that Emacs shows the edited filename
39
+
machine.wait_for_text("emacseditor")
44
-
# makes sure environment variables are accessible from Emacs
46
-
"emacsclient --eval '(getenv \"TEST_SYSTEM_VARIABLE\")' | grep -q 'system variable'"
41
+
# makes sure environment variables are accessible from Emacs
43
+
"emacsclient --eval '(getenv \"TEST_SYSTEM_VARIABLE\")' | grep -q 'system variable'"
49
-
machine.screenshot("emacsclient")
46
+
machine.screenshot("emacsclient")