From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WBQ+I95Yz2WXWAEAe85BDQ:P1 (envelope-from ) for ; Fri, 16 Feb 2024 13:45:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id WBQ+I95Yz2WXWAEAe85BDQ (envelope-from ) for ; Fri, 16 Feb 2024 13:45:18 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="QwXJ/bIf"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708087518; 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=y5fhioA4z5D+5iKHDnf4iX5nY5uAvB+83CXIUhdsb5o=; b=BRNAzcRhWeEaWalUWwXNpQ4UhPIw2zb2SGw60M0dVZ/Io1SWEWqVw5Cy20vCAtVlTfodP6 O1/IL0WAOCKUL1tsaCYdJ444kUBaLcFObU31DsHs0M/FeXo/Aq69y4PYY+EXJuuCQxqCob F9unXcq9DuRKr+DBVhs2BWH7KcH5E6qaJlux9J9B4OLMjZqAQU01QLxFwhPAu2fhSLIGI5 NMJ1nI+gKNjGlOYtVfLBhGCE9+yYuqGypHPpeoQc5lyl6YPfarVyrzk64LoevWEE8C3To6 v1FqvKtL1OWe9W31dDYBTZL8JOAG3lI3b3fZ7eAXjXygUsG3l+gP70GuYHSQpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="QwXJ/bIf"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708087518; a=rsa-sha256; cv=none; b=sPFy8HS4HKp/Hve7dNo6ql22koDF+InmXWNEj5/DYkjNAnuMlbexMDsB0z7hObg/yN8hQ0 3nOwTWBDXeSwRFU2Wn721dvPt5/d/DEDBPnsuSeA2HTLYJ3io+CNRuEu5f3icNSi2QucmX 6m2/w8m3ncUFoKug1fe6w5p1YBuk9aN8Cfg+/kc1BJS/6VBM4oHAUWWtN32aYO3fk2v1Xg T6q2eQfY6BJPMjGuGhgJr1DmeyavmrKqnaWwcW70nhsWhnkmvQ/GxW1p4Sw7bgT0TyQM24 jFUxrtgoohKr7f0FO5eMCNE1eLPU+HmpZt+yQ4YGBasgSHpvvOIMeVSDI0y0jA== 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 50DBF21EA3 for ; Fri, 16 Feb 2024 13:45:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raxaH-00008K-9D; Fri, 16 Feb 2024 07:44:53 -0500 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 1raxa9-00006r-Ny for guix-patches@gnu.org; Fri, 16 Feb 2024 07:44:46 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raxa9-0004RJ-Fh for guix-patches@gnu.org; Fri, 16 Feb 2024 07:44:45 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1raxaR-0008Da-75; Fri, 16 Feb 2024 07:45:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68716] [PATCH gnome-team v4 3/7] services: Modularise gnome-desktop-configuration. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, rg@raghavgururajan.name, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Fri, 16 Feb 2024 12:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68716 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68716@debbugs.gnu.org Cc: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, rg@raghavgururajan.name, vivien@planete-kraus.eu X-Debbugs-Original-Xcc: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, rg@raghavgururajan.name, vivien@planete-kraus.eu Received: via spool by 68716-submit@debbugs.gnu.org id=B68716.170808747331490 (code B ref 68716); Fri, 16 Feb 2024 12:45:03 +0000 Received: (at 68716) by debbugs.gnu.org; 16 Feb 2024 12:44:33 +0000 Received: from localhost ([127.0.0.1]:57992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raxZw-0008Bj-AZ for submit@debbugs.gnu.org; Fri, 16 Feb 2024 07:44:32 -0500 Received: from mail-ej1-f67.google.com ([209.85.218.67]:56737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raxZp-0008Ah-Op for 68716@debbugs.gnu.org; Fri, 16 Feb 2024 07:44:28 -0500 Received: by mail-ej1-f67.google.com with SMTP id a640c23a62f3a-a29c4bbb2f4so263689066b.1 for <68716@debbugs.gnu.org>; Fri, 16 Feb 2024 04:44:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708087381; x=1708692181; darn=debbugs.gnu.org; h=to:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=y5fhioA4z5D+5iKHDnf4iX5nY5uAvB+83CXIUhdsb5o=; b=QwXJ/bIfy8g+GDIYBIztXiR44YuKV13xvushTqgOgB224SS5oKlXTOpIwgGDtEbQ+a yM+w0sJvGmZ4UtMO5R4v7UUIOK+HM58qDHeb7SFrVTqXjdfUX+r6ueS7mIY6BlvT0mUM 4JQh7EgqjVzy8Y9SWC6mmnsWY2PCOD9IUgZUE7n3hRaf+yVYkkTtonveCjmmuUAa+3XL rOLlGKgejDstdx+kTihIASn8Y04saRG1gWSXhOpiDz64MnUJlBP/WiKMdDr3x+B23Oqi r/Qen7iJk8HOh4GYQTHhmDGsmi5nQso07rjsEer2/MoIHf1ySKpANuvh4Rd4227tpKdC UHiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708087381; x=1708692181; h=to:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y5fhioA4z5D+5iKHDnf4iX5nY5uAvB+83CXIUhdsb5o=; b=jkGbkhD4JO9VfXBN4SuLU3rU8XmEY+WkWzk1CFHg0+eXt6sZRZa0SSEho5GjlfPeeL uP5oBLbqIgzT26NTcm0rrRGLneLUkhl7VOc286IjzMWqqY6wsOd/+EV8fpRut7lfk+OY Zye0TqMOQn5G1aRYdYLNPyrTW2SexCmOKyVrNtdcRFM5vLPqWQsWf3UzzNDUITZYzzm2 0yHdDxdeUILKtIjjsNN7cA/kNw5PlCm/UsIlpM4TC3AViS/kNUVI9FJOf8fszC5cI0Xt TL5hTuqkAuMK9cU7PG64/2shjwz4pVnvUuECOmI751wg59i4GbxTaT9ikNuQC8hcZwjk L6fQ== X-Gm-Message-State: AOJu0YyJ+HZvmulj30PIzcO+X3MP9gyjL/uSX2Sv8tSjN+TK1iM4G1sC 4Q3yvmp7cP3SGTFOvYynpOBk8J6DL9atYbCt+yGRppM8kxEuncMSvZSYIDU8tCY= X-Google-Smtp-Source: AGHT+IFoPmjNIUYWe0VFQsz6Ywyh2q+et863tnA603ORbapiP+FvZZSMDNq0WgqDbsL+H6h1nMX4lg== X-Received: by 2002:a17:906:7196:b0:a3c:7fcc:3967 with SMTP id h22-20020a170906719600b00a3c7fcc3967mr3678204ejk.40.1708087380632; Fri, 16 Feb 2024 04:43:00 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id hw12-20020a170907a0cc00b00a3d5d8ff745sm1544090ejc.144.2024.02.16.04.43.00 for <68716@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 04:43:00 -0800 (PST) Message-ID: <5a3f4ee73a4798d3e5ebc3c5bdc2980cf8fb16c8.1708087345.git.liliana.prikler@gmail.com> In-Reply-To: <5e0b95c296a3abfe2da6c1828dfbbc1a47886083.1708087345.git.liliana.prikler@gmail.com> References: <5e0b95c296a3abfe2da6c1828dfbbc1a47886083.1708087345.git.liliana.prikler@gmail.com> From: Liliana Marie Prikler Date: Thu, 25 Jan 2024 16:35:17 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 5.02 X-Spam-Score: 5.02 X-Migadu-Queue-Id: 50DBF21EA3 X-TUID: MHcGUUr//Wsd * gnu/services/gnome.scm (extract-propagated-inputs): New variable. (gnome-desktop-configuration): Add ‘core-services’, ‘shell’, ‘utilities’, and ‘extra-packages’. Deprecate ‘gnome’. (gnome-desktop-configuration-core-services, gnome-desktop-configuration-shell) (gnome-desktop-configuration-utilities) (gnome-desktop-configuration-extra-packages): Export publicly. (gnome-udev-rules, gnome-polkit-settings): Adjust accordingly. (gnome-profile): New variable. (gnome-desktop-service-type): Adjust accordingly. --- gnu/services/desktop.scm | 97 ++++++++++++++++++++++++++++++++++------ 1 file changed, 83 insertions(+), 14 deletions(-) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 5b79fbcda1..0667acfaba 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -37,6 +37,7 @@ (define-module (gnu services desktop) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services base) + #:use-module (gnu services configuration) #:use-module (gnu services dbus) #:use-module (gnu services avahi) #:use-module (gnu services xorg) @@ -60,6 +61,7 @@ (define-module (gnu services desktop) #:use-module (gnu packages kde) #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages kde-plasma) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages xfce) #:use-module (gnu packages avahi) #:use-module (gnu packages xdisorg) @@ -73,6 +75,7 @@ (define-module (gnu services desktop) #:use-module (gnu packages nfs) #:use-module (gnu packages enlightenment) #:use-module (guix deprecation) + #:use-module (guix diagnostics) #:use-module (guix records) #:use-module (guix packages) #:use-module (guix store) @@ -81,6 +84,7 @@ (define-module (gnu services desktop) #:use-module (guix gexp) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-35) #:use-module (ice-9 format) #:use-module (ice-9 match) #:export ( @@ -139,6 +143,10 @@ (define-module (gnu services desktop) gnome-desktop-configuration gnome-desktop-configuration? + gnome-desktop-configuration-core-services + gnome-desktop-configuration-shell + gnome-desktop-configuration-utilities + gnome-desktop-configuration-extra-packages gnome-desktop-service gnome-desktop-service-type @@ -1382,11 +1390,34 @@ (define sane-service-type ;;; GNOME desktop service. ;;; -(define-record-type* gnome-desktop-configuration - make-gnome-desktop-configuration - gnome-desktop-configuration? - (gnome gnome-desktop-configuration-gnome - (default gnome))) +(define-maybe/no-serialization package) + +(define (extract-propagated-inputs package) + ;; Drop input labels. Attempt to support outputs. + (map + (match-lambda + ((_ (? package? pkg)) pkg) + ((_ (? package? pkg) output) (list pkg output))) + (package-propagated-inputs package))) + +(define-configuration/no-serialization gnome-desktop-configuration + (core-services + (list-of-packages (extract-propagated-inputs gnome-meta-core-services)) + "A list of packages that the GNOME Shell and applications may rely on.") + (shell + (list-of-packages (extract-propagated-inputs gnome-meta-core-shell)) + "A list of packages that constitute the GNOME Shell, without applications.") + (utilities + (list-of-packages (extract-propagated-inputs gnome-meta-core-utilities)) + "A list of packages that serve as applications to use on top of the \ +GNOME Shell.") + (gnome (maybe-package) "Deprecated. Do not use.") + (extra-packages + (list-of-packages (extract-propagated-inputs gnome-essential-extras)) + "A list of GNOME-adjacent packages to also include. This field is intended +for users to add their own packages to their GNOME experience. Note, that it +already includes some packages that are considered essential by some (most?) +GNOME users.")) (define (gnome-package gnome name) "Return the package NAME among the GNOME package inputs. NAME can be a @@ -1400,18 +1431,56 @@ (define (gnome-packages gnome names) (define (gnome-udev-rules config) "Return the list of GNOME dependencies that provide udev rules." - (let ((gnome (gnome-desktop-configuration-gnome config))) - (gnome-packages gnome '("gnome-settings-daemon")))) + (let* ((gnome (gnome-desktop-configuration-gnome config)) + (shell (gnome-desktop-configuration-shell config))) + (or (any (match-lambda + ((and pkg (= package-name "gnome-settings-daemon")) + (list pkg)) + (_ #f)) + shell) + (and (maybe-value-set? gnome) + (gnome-packages gnome '("gnome-settings-daemon"))) + (raise + (condition + (&error-location + (location (gnome-desktop-configuration-source-location config))) + (&message (message (G_ "Missing gnome-settings-daemon")))))))) (define (gnome-polkit-settings config) "Return the list of GNOME dependencies that provide polkit actions and rules." - (let ((gnome (gnome-desktop-configuration-gnome config))) - (gnome-packages gnome - '("gnome-settings-daemon" - "gnome-control-center" - "gnome-system-monitor" - "gvfs")))) + (let ((gnome (gnome-desktop-configuration-gnome config)) + (shell (gnome-desktop-configuration-shell config))) + (or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg)) + (_ #f)) + shell) + (and (maybe-value-set? gnome) + (gnome-packages gnome + '("gnome-settings-daemon" + "gnome-control-center" + "gnome-system-monitor" + "gvfs"))) + (raise + (condition + (&error-location + (location (gnome-desktop-configuration-source-location config))) + (&message (message (G_ "Missing gvfs")))))))) + +(define (gnome-profile config) + "Return a list of packages propagated through CONFIG." + (append + (gnome-desktop-configuration-core-services config) + (gnome-desktop-configuration-shell config) + (gnome-desktop-configuration-utilities config) + (let ((gnome-meta (gnome-desktop-configuration-gnome config))) + (if (maybe-value-set? gnome-meta) + (begin + (warning + (gnome-desktop-configuration-source-location config) + (G_ "Using a meta-package for gnome-desktop is discouraged.~%")) + (list gnome-meta)) + (list))) + (gnome-desktop-configuration-extra-packages config))) (define gnome-desktop-service-type (service-type @@ -1422,7 +1491,7 @@ (define gnome-desktop-service-type (service-extension polkit-service-type gnome-polkit-settings) (service-extension profile-service-type - (compose list gnome-desktop-configuration-gnome)))) + gnome-profile))) (default-value (gnome-desktop-configuration)) (description "Run the GNOME desktop environment."))) -- 2.41.0