From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gF8+FEaKg2SPCgAASxT56A (envelope-from ) for ; Fri, 09 Jun 2023 22:23:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wDE2FEaKg2QgOgAA9RJhRA (envelope-from ) for ; Fri, 09 Jun 2023 22:23:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 50A93CCD for ; Fri, 9 Jun 2023 22:23:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=ijknHMDf; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686342214; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+tceL0zuLolXfXbxs+tIYQXEDrNG+RorOXQX7fvxzEA=; b=o+hp2/mJfgMEDZqRiGBmA0iSvUHUfkVX2dzbUL1TXSw6FOrXQKKcqfqebSdFxo+Fx55qqH nyn8asfq2MBAtu6Lorcs8FTmBb61GyjegquUrS4rZF+IlF5V5JwMVmAzwSUlrQLRiKzZpH Mb0RQHcVcm8IR10p2UiQkRYUWxc4JwSx3N4o8nCst3uTmmXZp9+BwdtcQ1c3jZymmMJEyB FSg1Z7ZN4/rVbJp295PQb7gueB3rPMXZgBhJOTQOfMV4v3YA5JTKd7wicXNaSv9nqWzojW xdN8i99UEIdKsBJvCKpapIHWr/FD5iitBbiF8m12eTbjpat/J/YpoBe9OEyDPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=ijknHMDf; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686342214; a=rsa-sha256; cv=none; b=WL7fccM1b5G8p32tiul+xQcr++la2T1YolUe0XoPpRVIGo23yUqj37aKoViRglF/ybJU9q OfxDTTMFJLswUPYiSwF58WU/tUQAc//X9WO/qfQWSxRmm8tYOTJ4CoKUL9ykT4jQout4gA t4zPITLPdCeQHGEXrdbhe+GzTphr4VfubEWS0B6oi9w6/KeZMY3lFGCN56uQmmYvexlwkb IZPLdnAENdQC4bf2vPiedUxbBr3uxtj+a1NhJM/eCj8evmnw750apQtlpCSlJG+2fcq1cQ HU2TUBKzHuXAdDvmUcVsStuohKFpa2VfI+kJxMIX0CrcDSemN6aP5R55yAIY2g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7idU-0001TX-Ow; Fri, 09 Jun 2023 16:23:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7idT-0001TJ-8S for guix-patches@gnu.org; Fri, 09 Jun 2023 16:23:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7idS-00019N-Ti for guix-patches@gnu.org; Fri, 09 Jun 2023 16:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7idS-0007Na-Ar for guix-patches@gnu.org; Fri, 09 Jun 2023 16:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63863] [PATCH] gnu: home: Add support for home-pipewire-service Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2023 20:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63863 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Brian Cully Cc: , 63863@debbugs.gnu.org Received: via spool by 63863-submit@debbugs.gnu.org id=B63863.168634214528299 (code B ref 63863); Fri, 09 Jun 2023 20:23:02 +0000 Received: (at 63863) by debbugs.gnu.org; 9 Jun 2023 20:22:25 +0000 Received: from localhost ([127.0.0.1]:60981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7icq-0007MN-G0 for submit@debbugs.gnu.org; Fri, 09 Jun 2023 16:22:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7ico-0007MA-U2 for 63863@debbugs.gnu.org; Fri, 09 Jun 2023 16:22:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7ici-000108-1n; Fri, 09 Jun 2023 16:22:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=xC3LXa7Jh2OjXh/EOr5+1qVHjmx7EiXP3fB8W+GAcOY=; b=ijknHMDfuE3LuiOa9V0S KCqg6f4MhDt+snFNstrDqx6ryaOU38e+0aOfllKrSpLcf5RLKCKyVJho8T7cJxRoteEAQUPow7hGz nH7epkOPxlH/vwRlnFJ97DgeBrRTXzu/1z7PNQ9WBOQe9RzW1wEueGP49hWyyTn2fDuLkqpRJb/4d +kB8AQnKJEfZptpGW7zu+xs91Ykss2gUdujWB8Ac0MLQAeYNrjJAWaCnlygY5ODtAl7PeSFKlaKca vzRJ47ZCnfeaSEVSh1LvNVVYa4j3BFK1yVt0IMmhQRsIOvfbGTjOqiy1A9YdjZ+EnBmpl4R3RARTI GAKpxIzALWI6Ww==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7ich-00046H-3A; Fri, 09 Jun 2023 16:22:15 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <13252a733171e18f4d39d0185ddf3e8e3c06bc15.1685747062.git.bjc@spork.org> Date: Fri, 09 Jun 2023 22:22:12 +0200 In-Reply-To: <13252a733171e18f4d39d0185ddf3e8e3c06bc15.1685747062.git.bjc@spork.org> (Brian Cully's message of "Fri, 2 Jun 2023 19:04:27 -0400") Message-ID: <87o7lov11n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: UNKNOWN X-Migadu-Flow: FLOW_IN X-Spam-Score: -2.56 X-Migadu-Queue-Id: 50A93CCD X-Migadu-Scanner: in3.migadu.com X-Migadu-Spam-Score: -2.56 X-TUID: W1j/rYHrWmDf Hi, Brian Cully 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-servic= e), > (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=E2=80=99d 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: =E2=80=9CWhen true, PulseAudio applications will talk to PipeWir= e, which will handle them as if they were ``native'' PipeWire applications.=E2=80=9D (I=E2=80=99m 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 =E2=80=98stop=E2=80=99 method or the process will never be s= topped. :-) > + (start #~(make-forkexec-constructor > + (list #$(file-append > + (home-pipewire-configuration-pipewire config) > + "/bin/pipewire-pulse")))))) Same here=E2=80=A6 > + (start #~(make-forkexec-constructor > + (list #$(file-append > + (home-pipewire-configuration-wireplumber config) > + "/bin/wireplumber")))))) =E2=80=A6 and here. > +(define (home-pipewire-shepherd-services config) > + (define shepherd-services > + (filter > + identity > + (list home-pipewire-shepherd-service home-wireplumber-shepherd-serv= ice > + (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 =E2=80=A6 (list (home-pipewire-pulseaudio-shepherd-service config)) '())) > + (description > + "Start essential PipeWire services.") Can you add a couple of sentences? That=E2=80=99s useful when running =E2= =80=98guix home search=E2=80=99 or similar. > + > + > +;;; > +;;; Generate documentation. > +;;; > +(define (generate-doc) > + (configuration->documentation 'home-pipewire-configuration)) This is unused, please remove it. Could you send a v2? Thanks! Ludo=E2=80=99.