GNU bug report logs - #75847
[PATCH 0/2] Reinstate auto-configuration for GNOME Boxes.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sun, 26 Jan 2025 02:51:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 75847 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [bug#75847] [PATCH 1/2] services/desktop: Use transitively propagated GNOME packages for polkit/udev.
Date: Sun, 26 Jan 2025 11:55:46 +0900
This is useful for automatically picking up the polkit or udev rules from the
GNOME packages propagated inputs (transitively), e.g. spice-gtk from the
gnome-boxes package.

* gnu/services/desktop.scm (gnome-profile): Add a #:transitive? argument.
(gnome-udev-configuration-files): Use it.
(gnome-polkit-settings): Likewise.

Change-Id: I3597c9d3dc296e8f3e45017bb02e500db0b73783
---

 gnu/services/desktop.scm | 42 ++++++++++++++++++++++++----------------
 1 file changed, 25 insertions(+), 17 deletions(-)

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index a0291ea222..a214d5b6a2 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1547,7 +1547,7 @@ (define (gnome-udev-configuration-files config)
           (union-build #$output
                        (search-path-as-list
                         (list "lib/udev" "libexec/udev")
-                        (list #$@(gnome-profile config)))
+                        (list #$@(gnome-profile config #:transitive? #t)))
                        #:create-all-directories? #t)
           (for-each
            (lambda (pattern)
@@ -1572,7 +1572,7 @@ (define (gnome-polkit-settings config)
           (union-build output
                        (search-path-as-list
                         (list "share/polkit-1")
-                        (list #$@(gnome-profile config)))
+                        (list #$@(gnome-profile config #:transitive? #t)))
                        #:create-all-directories? #t)
           (for-each
            (lambda (pattern)
@@ -1581,21 +1581,29 @@ (define (gnome-polkit-settings config)
               (find-files output pattern)))
            (list #$@(gnome-desktop-configuration-polkit-ignorelist config))))))))
 
-(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-profile config #:key transitive?)
+  "Return the list of the packages specified in CONFIG.  When TRANSITIVE? is
+#t, also include their transitive propagated inputs."
+  (define gnome-packages
+    (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)))
+  (if transitive?
+      (append gnome-packages
+              (append-map (compose (cut map second <>) ;discard labels
+                                   package-transitive-propagated-inputs)
+                          gnome-packages))
+      gnome-packages))
 
 (define gnome-desktop-service-type
   (service-type

base-commit: 4797fb64caf7bf869b0183c96e1c24885313abbc
-- 
2.47.1





This bug report was last modified 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.