From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id aCJRJP0+wWVWHAEAqHPOHw:P1 (envelope-from ) for ; Mon, 05 Feb 2024 21:03:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aCJRJP0+wWVWHAEAqHPOHw (envelope-from ) for ; Mon, 05 Feb 2024 21:03:09 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniB header.b=luQCnr1q; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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=1707163389; a=rsa-sha256; cv=none; b=ppkcg/vrT+iBj/LCXx0W5dcfyJu3DZFCMMXeHeq3LhhcEBxc4eHernZUO4DO773AIeRgmz 6dFlWF7MMHO+HfyBG/7DFex++E8rXxOMSS0qCfXd3GCpP4OAlPwfok8184IpSYSx/xsGks BbV3XMB/BPP6vMOHn6if6JpS0h1RGumCcMaMrwotNq7C6AyoDTpaMUq8iwD4qNHKYDQAuj 4pOu4RBrM3CrHpDxre6pxWHVf8xo7RQ6G6Lt6XVNRtwX5kRRQ98f/lGHpTXJKZcUdN8bl+ Ft1FBhJzqqsghKDyk2HkDNAiJ8idFEqDq7kXL7wosppRJYjl1apptrzrvow4HA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=albinoniB header.b=luQCnr1q; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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=1707163389; 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=QSoEgaxAUCjXAA0xePFBox2yI3qijn9AG/X6pCsh/BY=; b=RFLRU8G6m8nRmb+6VUC+7DqbUTmSNT8uWz+nv693oAZa/Q0dyXWJLT59gfbU48pAJmsywz bGExlkJ/HghlLXPOotOwmKQ5wsF1xkuOHq8ed8YFHlHPzhitVgn1gPcDYBQxhBKkHKn3Wx Hp8OkS66ckRhxb9Gw1P59/R4vrgcJfeZMpe2OpS9Tj7TA0NuJl+n+lpDOw6eCNrTx3YamY t5URChB4MyG8kklgNUlPueycPBRA3xHKfOURzpzwGgu40nc+dXiaNgzc0RgHRJqijZegz8 0VN1cSP72YxFD+axPzPLnJycjU496P1X+Tg1IqhYCPw30l3Sj2OmYuqVw2xC8Q== 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 68C0C20D3B for ; Mon, 5 Feb 2024 21:03:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rX5B4-0006gP-UW; Mon, 05 Feb 2024 15:02:50 -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 1rX5B3-0006fo-M5 for guix-patches@gnu.org; Mon, 05 Feb 2024 15:02:49 -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 1rX5B3-0001bc-Cb for guix-patches@gnu.org; Mon, 05 Feb 2024 15:02:49 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rX5BG-0004H6-2D for guix-patches@gnu.org; Mon, 05 Feb 2024 15:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68716] [PATCH gnome-team v2 1/5] services: Modularise gnome-desktop-configuration. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Feb 2024 20:03:02 +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: rg@raghavgururajan.name, vivien@planete-kraus.eu, liliana.prikler@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 68716-submit@debbugs.gnu.org id=B68716.170716334816351 (code B ref 68716); Mon, 05 Feb 2024 20:03:02 +0000 Received: (at 68716) by debbugs.gnu.org; 5 Feb 2024 20:02:28 +0000 Received: from localhost ([127.0.0.1]:52354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rX5Ah-0004Fd-Eg for submit@debbugs.gnu.org; Mon, 05 Feb 2024 15:02:28 -0500 Received: from planete-kraus.eu ([89.234.140.182]:37406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rX5Ad-0004Eo-8q for 68716@debbugs.gnu.org; Mon, 05 Feb 2024 15:02:24 -0500 Received: from planete-kraus.eu (localhost [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 5bce9231; Mon, 5 Feb 2024 20:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:mime-version :content-type:content-transfer-encoding:to:cc; s=albinoniB; bh=U x2jSJNdiZX67B9KVp1sI3aPBm8=; b=luQCnr1q11jGnze+s00v+1ZFPH9uo9+DT /k2Lo+cpMJ3v1Bo+d9xtEckfeq0bRQLZ4XLLE7F2FD1ck1/hksPaPGNPR96wm3vX nRPioo+pLytZQE0V2IMmpiaawW4KY1sTvsVbnmV9Z0G/9Tm6d8tIjuaWNqw99bBO hR6e81GwUDwpcdVfDxGoJcxdNkssvX/9f/Cy+2FYsWJQ/rtlML/4274y9P9B/26P jL2QVcgLVN8Pg5GUJJACJPwwAmn4pULnx10WUqHLSf19CmEKfNAKg6aT63mF/Rnk G42L8cl7aHh3VdacNz9+q8pAbcMcsuNgY5EIopUABrRm0KG1Jzw5A== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 05cddff9 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Mon, 5 Feb 2024 20:02:03 +0000 (UTC) Message-ID: In-Reply-To: References: 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 User-Agent: Evolution 3.48.4 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Spam-Score: -3.07 X-Migadu-Queue-Id: 68C0C20D3B X-Migadu-Spam-Score: -3.07 X-TUID: y3gLgxny9E4b * gnu/services/gnome.scm (%gnome-core-services, %gnome-core-shell) (%gnome-core-utilities, %gnome-essential-extras): New variables. (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 | 172 +++++++++++++++++++++++++++++++++++---- 1 file changed, 158 insertions(+), 14 deletions(-) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 5b79fbcda1..86be99252d 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) @@ -56,10 +57,16 @@ (define-module (gnu services desktop) #:use-module (gnu packages admin) #:use-module (gnu packages cups) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages fonts) + #:use-module (gnu packages geo) + #:use-module (gnu packages gstreamer) + #:use-module (gnu packages gtk) #:use-module (gnu packages gnome) + #:use-module (gnu packages gnupg) #: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 +80,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 +89,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 ( @@ -137,8 +146,16 @@ (define-module (gnu services desktop) cups-pk-helper-service-type sane-service-type + %gnome-core-services + %gnome-core-shell + %gnome-core-utilities + %gnome-essential-extras 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 +1399,100 @@ (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 %gnome-core-services + (list accountsservice network-manager packagekit upower)) + +(define %gnome-core-shell + (list gdm + gnome-backgrounds + gnome-bluetooth + gnome-color-manager + gnome-desktop + gnome-initial-setup + gnome-keyring + gnome-menus + gnome-session + gnome-settings-daemon + gnome-shell-extensions + gnome-shell + gnome-user-docs + gnome-user-share + gvfs + mutter + orca + rygel + sushi + adwaita-icon-theme + glib-networking + gsettings-desktop-schemas)) + +(define %gnome-core-utilities + (list baobab + cheese + eog + epiphany + evince + file-roller + gnome-calculator + gnome-calendar + gnome-characters + gnome-clocks + gnome-console + gnome-contacts + gnome-disk-utility + gnome-font-viewer + gnome-maps + gnome-music + gnome-photos + gnome-screenshot + gnome-system-monitor + gnome-text-editor + gnome-weather + nautilus + simple-scan + totem + tracker-miners + xdg-desktop-portal-gnome + yelp)) + +(define %gnome-essential-extras + (list at-spi2-core + dbus + dconf + desktop-file-utils + font-abattis-cantarell + font-dejavu + gnome-default-applications ; XXX: Allow customization by records + gst-plugins-base + gst-plugins-good + gucharmap + pinentry-gnome3 + pulseaudio ; XXX: Replace with pipewire + shared-mime-info + system-config-printer + xdg-user-dirs + zenity)) + +(define-maybe/no-serialization package) + +(define-configuration/no-serialization gnome-desktop-configuration + (core-services + (list-of-packages %gnome-core-services) + "A list of packages that the GNOME Shell and applications may rely on.") + (shell + (list-of-packages %gnome-core-shell) + "A list of packages that constitute the GNOME Shell, without applications.") + (utilities + (list-of-packages %gnome-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 %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 +1506,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 +1566,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