lib.darwin: simplify assertInterval

This commit is contained in:
Benedikt Rips
2026-01-05 23:03:28 +01:00
committed by Robert Helgesson
parent af7f14ddf7
commit d1da1de5c2
4 changed files with 6 additions and 6 deletions

View File

@@ -63,12 +63,12 @@ let
intervalsString = lib.concatStringsSep ", " intervals;
assertInterval = option: interval: pkgs: {
assertion = (!pkgs.stdenv.isDarwin) || (lib.elem interval intervals);
message = "On Darwin ${option} must be one of: ${intervalsString}.";
assertion = pkgs.stdenv.isDarwin -> lib.elem interval intervals;
message = "On Darwin, ${option} must be one of: ${intervalsString}.";
};
intervalDocumentation = ''
On Darwin it must be one of: ${intervalsString}, which are implemented as defined in {manpage}`systemd.time(7)`.
On Darwin, it must be one of: ${intervalsString}, which are implemented as defined in {manpage}`systemd.time(7)`.
'';
in
{