GNU bug report logs - #76619
[PATCH] gnu: home: services: Add 'wayland-display' service.

Previous Next

Package: guix-patches;

Reported by: Sisiutl <sisiutl <at> egregore.fun>

Date: Thu, 27 Feb 2025 22:48:04 UTC

Severity: normal

Tags: patch

Merged with 76057, 76058, 76060, 76659, 76667

Full log


View this message in rfc822 format

From: Hilton Chain <hako <at> ultrarare.space>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Sisiutl <sisiutl <at> egregore.fun>, 76619 <at> debbugs.gnu.org
Subject: [bug#76619] [PATCH] gnu: home: services: Add 'wayland-display' service.
Date: Sun, 02 Mar 2025 13:10:15 +0800
Hi Sisiutl and Ludo,

I merged all wayland-display issues, please send follow-ups to
ISSUE_NUMBER <at> debbugs.gnu.org instead of guix-patches <at> gnu.org next time :)

On Sat, 01 Mar 2025 06:02:07 +0800,
Ludovic Courtès wrote:
>
> Hello,
>
> Sisiutl <sisiutl <at> egregore.fun> skribis:
>
> > * gnu/home/services/desktop.scm (wayland-shepherd-service): New procedure.
> > (home-wayland-service-type): New variable.
> > * doc/guix.texi (Desktop Home Services): Document it.
> >
> > Change-Id: If1ed849d29198d2949c6852b0f2645e325211240
>
> Nice!  So this is a followup to <https://issues.guix.gnu.org/76060>.
>
>
> [...]
>
> > +(define (wayland-shepherd-service config)
> > +  (list (shepherd-service
> > +         (provision '(wayland-display))
> > +         (modules '((ice-9 ftw)
> > +                    (ice-9 regex)
> > +                    (ice-9 match)
> > +                    (srfi srfi-1)
> > +                    (shepherd support)))
> > +         (respawn? #t)
> > +         (respawn-limit config)
> > +         (respawn-delay 1)
>
> The default value for ‘config’ is 10, but that’s not a valid value for
> ‘respawn-limit’ (it should be a pair).
>
> But anyway, we should remove these two fields: they have no effect,
> except for services associated with a process.  We can also change
> ‘default-value’ to #f or so to not give the impression that it has a
> special meaning.
>
> Apart from that LGTM; let me know if you can make this change (and if it
> sounds right to you) or I can do it on your behalf.

Since some services may depend on either DISPLAY or WAYLAND_DISPLAY, and these
two services (x11-display, wayland-display) are similar, I think we can merge
them into one and deprecate home-x11-service-type by this new service.

e.g.
--8<---------------cut here---------------start------------->8---
service: home-display-service-type
configuration: x11? (boolean: #f) wayland? (boolean: #f) time-to-wait (integer: 10)
default-value #f
provision: 'x11-display when x11? is #t
           'wayland-display when walyand? is #t
           'display when either x11? or wayland? is #t
return value: "DISPLAY: unset; WAYLAND_DISPLAY: wayland-1"
--8<---------------cut here---------------end--------------->8---

Then one service can choose to depend on 'display or specifically 'x11-display /
'wayland-display.

This bug report was last modified 95 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.