diff options
| author | Mike Vink <59492084+ivi-vink@users.noreply.github.com> | 2025-01-16 22:22:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-16 22:22:34 +0100 |
| commit | 8e7bd91f353caacc0bc4105f573eb3e17f09e03a (patch) | |
| tree | c5059edcbebd9644290cad7c653c49a36d593021 /tests/services-lorri.nix | |
| parent | 6bd39d420578aacf7c0bab7de3e7027b952115ae (diff) | |
| parent | bd921223ba7cdac346477d7ea5204d6f4736fcc6 (diff) | |
Diffstat (limited to 'tests/services-lorri.nix')
| -rw-r--r-- | tests/services-lorri.nix | 25 |
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" ''; } |
