all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: 68716@debbugs.gnu.org
Cc: rg@raghavgururajan.name, vivien@planete-kraus.eu,
	liliana.prikler@gmail.com, maxim.cournoyer@gmail.com
Subject: [bug#68716] [PATCH gnome-team v3 1/5] services: Modularise gnome-desktop-configuration.
Date: Thu, 25 Jan 2024 16:35:17 +0100	[thread overview]
Message-ID: <5a32e4ce61dd8d0aa204e1da57753acfbea378b3.1707175669.git.vivien@planete-kraus.eu> (raw)
In-Reply-To: <cover.1707175669.git.vivien@planete-kraus.eu>

* 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 (<upower-configuration>
@@ -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> 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




  reply	other threads:[~2024-02-05 23:32 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 16:12 [bug#68716] [PATCH gnome-team RFC 0/3] *** SUBJECT HERE *** Liliana Marie Prikler
2024-01-25 15:35 ` [bug#68716] [PATCH gnome-team RFC 1/3] services: Modularise gnome-desktop-configuration Liliana Marie Prikler
2024-01-25 17:12   ` Vivien Kraus via Guix-patches via
2024-01-25 17:38     ` Liliana Marie Prikler
2024-01-25 15:55 ` [bug#68716] [PATCH gnome-team RFC 2/3] gnu: Deprecate gnome meta-package Liliana Marie Prikler
2024-01-25 16:06 ` [bug#68716] [PATCH gnome-team RFC 3/3] services: gnome-desktop: Add core packages for GNOME 44 Liliana Marie Prikler
2024-01-26 21:13 ` [bug#68716] [PATCH gnome-team RFC 0/3] *** SUBJECT HERE *** Maxim Cournoyer
2024-02-05 20:00 ` [bug#68716] [PATCH gnome-team v2 0/5] Modularization of the gnome desktop service with udev blocklist Vivien Kraus via Guix-patches via
2024-01-25 15:35   ` [bug#68716] [PATCH gnome-team v2 1/5] services: Modularise gnome-desktop-configuration Liliana Marie Prikler
2024-01-25 15:55   ` [bug#68716] [PATCH gnome-team v2 3/5] gnu: Deprecate gnome meta-package Liliana Marie Prikler
2024-01-25 16:06   ` [bug#68716] [PATCH gnome-team v2 2/5] services: gnome-desktop: Add core packages for GNOME 44 Liliana Marie Prikler
2024-02-05 17:05   ` [bug#68716] [PATCH gnome-team v2 4/5] services: Rename gnome-udev-rules Vivien Kraus via Guix-patches via
2024-02-05 18:30   ` [bug#68716] [PATCH gnome-team v2 5/5] services: gnome: Use a blocklist for udev configurations Vivien Kraus via Guix-patches via
2024-02-05 20:52     ` Liliana Marie Prikler
2024-02-05 23:27 ` [bug#68716] [PATCH gnome-team v3 0/5] More elegant filtering of " Vivien Kraus via Guix-patches via
2024-01-25 15:35   ` Liliana Marie Prikler [this message]
2024-01-25 15:55   ` [bug#68716] [PATCH gnome-team v3 3/5] gnu: Deprecate gnome meta-package Liliana Marie Prikler
2024-01-25 16:06   ` [bug#68716] [PATCH gnome-team v3 2/5] services: gnome-desktop: Add core packages for GNOME 44 Liliana Marie Prikler
2024-02-05 17:05   ` [bug#68716] [PATCH gnome-team v3 4/5] services: Rename gnome-udev-rules Vivien Kraus via Guix-patches via
2024-02-05 18:30   ` [bug#68716] [PATCH gnome-team v3 5/5] services: gnome: Use a blocklist for udev configurations Vivien Kraus via Guix-patches via
2024-02-06  5:13   ` [bug#68716] [PATCH gnome-team v3 0/5] More elegant filtering of " Liliana Marie Prikler
2024-02-07 21:38     ` Vivien Kraus via Guix-patches via
2024-02-16 10:53 ` [bug#68716] [PATCH v5 1/8] gnu: Split gnome into more meta-packages Liliana Marie Prikler
2024-01-25 15:35   ` [bug#68716] [PATCH v5 3/8] services: Modularise gnome-desktop-configuration Liliana Marie Prikler
2024-01-25 15:55   ` [bug#68716] [PATCH v5 7/8] gnu: Deprecate gnome meta-package Liliana Marie Prikler
2024-02-05 17:05   ` [bug#68716] [PATCH v5 4/8] services: Extend udev capabilities of gnome-desktop-service Vivien Kraus
2024-02-16 11:02   ` [bug#68716] [PATCH v5 2/8] gnu: gnome: Add core packages for GNOME 44 Liliana Marie Prikler
2024-02-16 12:08   ` [bug#68716] [PATCH v5 5/8] services: Extend polkit capabilities of gnome-desktop-service Liliana Marie Prikler
2024-02-16 12:35   ` [bug#68716] [PATCH v5 6/8] services: desktop: Remove unused imports Liliana Marie Prikler
2024-02-17  8:19   ` [bug#68716] [PATCH v5 8/8] gnu: gnome: Update synopsis and description Liliana Marie Prikler
2024-02-24  6:40   ` bug#68716: [PATCH v5 1/8] gnu: Split gnome into more meta-packages Liliana Marie Prikler
2024-02-16 10:53 ` [bug#68716] [PATCH gnome-team v4 1/7] " Liliana Marie Prikler
2024-01-25 15:35   ` [bug#68716] [PATCH gnome-team v4 3/7] services: Modularise gnome-desktop-configuration Liliana Marie Prikler
2024-01-25 15:55   ` [bug#68716] [PATCH gnome-team v4 7/7] gnu: Deprecate gnome meta-package Liliana Marie Prikler
2024-02-16 17:44     ` Vivien Kraus via Guix-patches via
2024-02-05 17:05   ` [bug#68716] [PATCH gnome-team v4 4/7] services: Extend udev capabilities of gnome-desktop-service Vivien Kraus
2024-02-16 11:02   ` [bug#68716] [PATCH gnome-team v4 2/7] gnu: gnome: Add core packages for GNOME 44 Liliana Marie Prikler
2024-02-16 12:08   ` [bug#68716] [PATCH gnome-team v4 5/7] services: Extend polkit capabilities of gnome-desktop-service Liliana Marie Prikler
2024-02-16 12:35   ` [bug#68716] [PATCH gnome-team v4 6/7] services: desktop: Remove unused imports Liliana Marie Prikler
2024-02-16 19:44   ` [bug#68716] [PATCH gnome-team v4 1/7] gnu: Split gnome into more meta-packages Maxim Cournoyer
2024-02-16 20:08     ` Liliana Marie Prikler
2024-02-17  7:50       ` Vivien Kraus via Guix-patches via

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=5a32e4ce61dd8d0aa204e1da57753acfbea378b3.1707175669.git.vivien@planete-kraus.eu \
    --to=liliana.prikler@gmail.com \
    --cc=68716@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=rg@raghavgururajan.name \
    --cc=vivien@planete-kraus.eu \
    /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.