summaryrefslogtreecommitdiff
path: root/tests/services-lorri.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/services-lorri.nix')
-rw-r--r--tests/services-lorri.nix25
1 files changed, 20 insertions, 5 deletions
diff --git a/tests/services-lorri.nix b/tests/services-lorri.nix
index 52dcc91..7d30152 100644
--- a/tests/services-lorri.nix
+++ b/tests/services-lorri.nix
@@ -1,14 +1,29 @@
-{ config, pkgs, lib, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
let
plistPath = "${config.out}/user/Library/LaunchAgents/org.nixos.lorri.plist";
- expectedPath = "${lib.makeBinPath [config.nix.package pkgs.git pkgs.gnutar pkgs.gzip]}";
- expectedNixPath = "${"nixpkgs="+ toString pkgs.path}";
+ expectedPath = "${lib.makeBinPath [
+ config.nix.package
+ pkgs.git
+ pkgs.gnutar
+ pkgs.gzip
+ ]}";
+ expectedNixPath = "${"nixpkgs=" + toString pkgs.path}";
in
{
services.lorri.enable = true;
test = ''
- PATH=${lib.makeBinPath [ pkgs.xcbuild pkgs.jq ]}:$PATH
+ PATH=${
+ lib.makeBinPath [
+ pkgs.xcbuild
+ pkgs.jq
+ ]
+ }:$PATH
plutil -lint ${plistPath}
plutil -convert json -o service.json ${plistPath}
@@ -21,7 +36,7 @@ in
<service.json jq -e ".ProgramArguments|length == 3"
<service.json jq -e ".ProgramArguments[0] == \"/bin/sh\""
<service.json jq -e ".ProgramArguments[1] == \"-c\""
- <service.json jq -e ".ProgramArguments[2] == \"exec ${pkgs.lorri}/bin/lorri daemon\""
+ <service.json jq -e ".ProgramArguments[2] == \"/bin/wait4path /nix/store && exec ${pkgs.lorri}/bin/lorri daemon\""
<service.json jq -e ".RunAtLoad == true"
'';
}