1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 03:29:45 +01:00

emacs: add test case for darwin

This commit is contained in:
klchen0112 2024-11-23 00:20:39 +08:00
parent d1a3298de0
commit f921fd71bb
4 changed files with 37 additions and 0 deletions

View file

@ -173,6 +173,7 @@ in import nmtSrc {
./modules/xresources
] ++ lib.optionals isDarwin [
./modules/launchd
./modules/services/emacs-darwin
./modules/services/espanso-darwin
./modules/services/git-sync-darwin
./modules/services/imapnotify-darwin

View file

@ -0,0 +1,13 @@
{ ... }: {
emacs = { enable = true; };
test.stubs.nix = { };
nmt.script = ''
serviceFile=LaunchAgents/org.nix-community.home.emacs.plist
assertFileExists "$serviceFile"
assertFileContent "$serviceFile" ${./expected-agent.plist}
'';
}

View file

@ -0,0 +1 @@
{ emacs = ./basic.nix; }

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<true/>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>org.nix-community.home.emacs</string>
<key>ProgramArguments</key>
<array>
<string>@emacs/bin/emacs</string>
<string>--fg-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>%