all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Brian Cully <bjc@spork.org>
Cc: , 63863@debbugs.gnu.org
Subject: [bug#63863] [PATCH] gnu: home: Add support for home-pipewire-service
Date: Fri, 09 Jun 2023 22:22:12 +0200	[thread overview]
Message-ID: <87o7lov11n.fsf@gnu.org> (raw)
In-Reply-To: <13252a733171e18f4d39d0185ddf3e8e3c06bc15.1685747062.git.bjc@spork.org> (Brian Cully's message of "Fri, 2 Jun 2023 19:04:27 -0400")

Hi,

Brian Cully <bjc@spork.org> skribis:

> This adds a set of home shepherd services which will start the required
> services for a functional pipewire setup.
>
> * gnu/home/services/sound.scm (home-pipewire-shepherd-service),
> (home-pipewire-pulse-shepherd-service), (home-wireplumber-shepherd-service),
> (home-pipewire-shepherd-services), (generate-doc): new procedures.
> (home-pipewire-service-type): new service type.
> (home-pipewire-configuration): new struct.
> * doc/guix.texi (Sound Home Services): document it.

[...]

> +@cindex PipeWire, home service
> +
> +@uref{https://pipewire.org, PipeWire} provides a low-latency,
> +graph-based audio and video processing service. In addition to its
> +native protocol, it can also be used as a replacement for both JACK and
> +PulseAudio.

Could you explain why a Home service is necessary (I’d expect it to be
started on-demand via D-Bus or similar, like PulseAudio)?

Also, please leave two spaces after end-of-sentence periods (this eases
navigation in Emacs).

> +@table @asis
> +@item @code{pipewire} (default: @code{pipewire}) (type: file-like)
> +The PipeWire package to use.
> +
> +@item @code{wireplumber} (default: @code{wireplumber}) (type: file-like)
> +The WirePlumber package to use.

Could you add a few words saying what each of these packages does,
especially the second one.

> +@item @code{enable-pulseaudio?} (default: @code{#t}) (type: boolean)
> +Enable PulseAudio replacement.

Maybe add: “When true, PulseAudio applications will talk to PipeWire,
which will handle them as if they were ``native'' PipeWire
applications.” (I’m making it up, but you get the idea.)

> +;;; PipeWire support.
> +;;;
> +(define-configuration/no-serialization home-pipewire-configuration

Please leave an empty line after the comment.

> +(define (home-pipewire-shepherd-service config)
> +  (shepherd-service
> +   (documentation "PipeWire screen and audio sharing.")
> +   (provision '(pipewire))
> +   (requirement '(dbus))
> +   (start #~(make-forkexec-constructor
> +             (list #$(file-append
> +                      (home-pipewire-configuration-pipewire config)
> +                      "/bin/pipewire"))))))

Please add the ‘stop’ method or the process will never be stopped.  :-)

> +   (start #~(make-forkexec-constructor
> +             (list #$(file-append
> +                      (home-pipewire-configuration-pipewire config)
> +                      "/bin/pipewire-pulse"))))))

Same here…

> +   (start #~(make-forkexec-constructor
> +             (list #$(file-append
> +                      (home-pipewire-configuration-wireplumber config)
> +                      "/bin/wireplumber"))))))

… and here.


> +(define (home-pipewire-shepherd-services config)
> +  (define shepherd-services
> +    (filter
> +     identity
> +     (list home-pipewire-shepherd-service home-wireplumber-shepherd-service
> +           (and (home-pipewire-configuration-enable-pulseaudio? config)
> +                home-pipewire-pulseaudio-shepherd-service))))
> +  (map (cut <> config) shepherd-services))

Rather:

  (cons* (home-pipewire-shepherd-service config)
         (home-wireplumber-shepherd-service config)
         (if …
             (list (home-pipewire-pulseaudio-shepherd-service config))
             '()))

> +   (description
> +    "Start essential PipeWire services.")

Can you add a couple of sentences?  That’s useful when running ‘guix
home search’ or similar.

> +
> +\f
> +;;;
> +;;; Generate documentation.
> +;;;
> +(define (generate-doc)
> +  (configuration->documentation 'home-pipewire-configuration))

This is unused, please remove it.

Could you send a v2?

Thanks!

Ludo’.




  reply	other threads:[~2023-06-09 20:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 23:04 [bug#63863] [PATCH] gnu: home: Add support for home-pipewire-service Brian Cully via Guix-patches via
2023-06-09 20:22 ` Ludovic Courtès [this message]
2023-06-12  5:50 ` Andrew Tropin
2023-06-12 15:56   ` Brian Cully via Guix-patches via
2023-06-13  4:39     ` Andrew Tropin
2023-06-13 12:20       ` Brian Cully via Guix-patches via
2023-06-14  9:08         ` Andrew Tropin
2023-06-15 13:16 ` [bug#63863] [PATCH v2] " Brian Cully via Guix-patches via
2023-06-15 13:19   ` Brian Cully via Guix-patches via
2023-06-15 13:26 ` [bug#63863] [PATCH v3] " Brian Cully via Guix-patches via
2023-06-15 13:27   ` Brian Cully via Guix-patches via
2023-06-20 12:41 ` [bug#63863] [PATCH v4 0/1] " Brian Cully via Guix-patches via
2023-06-20 12:41   ` [bug#63863] [PATCH v4 1/1] " Brian Cully via Guix-patches via
2023-07-02 12:39 ` [bug#63863] [PATCH v5 0/1] " Brian Cully via Guix-patches via
2023-07-02 12:39   ` [bug#63863] [PATCH v5 1/1] " Brian Cully via Guix-patches via
2023-11-12 14:14     ` Hilton Chain via Guix-patches via
2023-08-23  8:25 ` Tanguy LE CARROUR
2023-08-23 18:44   ` brian via Guix-patches via
2023-08-25  6:44     ` Tanguy LE CARROUR
2023-10-11 11:34 ` taosabella
2023-11-05 15:09 ` [bug#63863] (no subject) Jakob Honal
2023-12-16 15:17 ` [bug#63863] [PATCH v5 1/1] gnu: home: Add support for home-pipewire-service Brian Cully via Guix-patches via
2023-12-16 15:23 ` [bug#63863] [PATCH v6] " Brian Cully via Guix-patches via
2023-12-20  8:46   ` bug#63863: " Oleg Pykhalov
2023-12-22 15:22 ` [bug#63863] [PATCH v7] " Brian Cully via Guix-patches via
     [not found] ` <handler.63863.D63863.17030619999937.notifdone@debbugs.gnu.org>
2023-12-22 15:22   ` [bug#63863] closed (Re: [bug#63863] [PATCH v6] gnu: home: Add support for home-pipewire-service) Brian Cully via Guix-patches via
2023-12-26 12:57     ` bug#63863: " Oleg Pykhalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7lov11n.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=63863@debbugs.gnu.org \
    --cc=bjc@spork.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.