|
1 | | -import ./make-test-python.nix ( |
2 | | - { pkgs, ... }: |
3 | | - { |
4 | | - name = "emacs-daemon"; |
5 | | - meta = with pkgs.lib.maintainers; { |
6 | | - maintainers = [ ]; |
7 | | - }; |
| 1 | +{ lib, ... }: |
| 2 | +{ |
| 3 | + name = "emacs-daemon"; |
| 4 | + meta.maintainers = lib.teams.emacs.members; |
8 | 5 |
|
9 | | - enableOCR = true; |
| 6 | + enableOCR = true; |
10 | 7 |
|
11 | | - nodes.machine = |
12 | | - { ... }: |
| 8 | + nodes.machine = |
| 9 | + { ... }: |
13 | 10 |
|
14 | | - { |
15 | | - imports = [ ./common/x11.nix ]; |
16 | | - services.emacs = { |
17 | | - enable = true; |
18 | | - defaultEditor = true; |
19 | | - }; |
| 11 | + { |
| 12 | + imports = [ ./common/x11.nix ]; |
| 13 | + services.emacs = { |
| 14 | + enable = true; |
| 15 | + defaultEditor = true; |
| 16 | + }; |
20 | 17 |
|
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"; |
23 | 20 |
|
24 | | - environment.variables.TEST_SYSTEM_VARIABLE = "system variable"; |
25 | | - }; |
| 21 | + environment.variables.TEST_SYSTEM_VARIABLE = "system variable"; |
| 22 | + }; |
26 | 23 |
|
27 | | - testScript = '' |
28 | | - machine.wait_for_unit("multi-user.target") |
| 24 | + testScript = '' |
| 25 | + machine.wait_for_unit("multi-user.target") |
29 | 26 |
|
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') |
32 | 29 |
|
33 | | - # waits for the emacs service to be ready |
34 | | - machine.wait_until_succeeds( |
35 | | - "systemctl --user status emacs.service | grep 'Active: active'" |
36 | | - ) |
| 30 | + # waits for the emacs service to be ready |
| 31 | + machine.wait_until_succeeds( |
| 32 | + "systemctl --user status emacs.service | grep 'Active: active'" |
| 33 | + ) |
37 | 34 |
|
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") |
40 | 37 |
|
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") |
43 | 40 |
|
44 | | - # makes sure environment variables are accessible from Emacs |
45 | | - machine.succeed( |
46 | | - "emacsclient --eval '(getenv \"TEST_SYSTEM_VARIABLE\")' | grep -q 'system variable'" |
47 | | - ) |
| 41 | + # makes sure environment variables are accessible from Emacs |
| 42 | + machine.succeed( |
| 43 | + "emacsclient --eval '(getenv \"TEST_SYSTEM_VARIABLE\")' | grep -q 'system variable'" |
| 44 | + ) |
48 | 45 |
|
49 | | - machine.screenshot("emacsclient") |
50 | | - ''; |
51 | | - } |
52 | | -) |
| 46 | + machine.screenshot("emacsclient") |
| 47 | + ''; |
| 48 | +} |
0 commit comments