guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/12: Revert "build-system/qt: Wrappers only include relevant directori


From: guix-commits
Subject: 06/12: Revert "build-system/qt: Wrappers only include relevant directories to XDG_DATA_DIRS."
Date: Fri, 2 Jul 2021 16:52:51 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 1879b05f90555c3401162eb7a0cc1cea0601e66c
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jul 2 00:59:41 2021 -0400

    Revert "build-system/qt: Wrappers only include relevant directories to 
XDG_DATA_DIRS."
    
    This reverts commit c5fd1b0bd362f8b8578a76a26a65ba5d00d48992.  It will need 
to
    be refactored on top of 2214b7b78d34a0e4d574b743dbeb8457356f6cff.
---
 guix/build/qt-build-system.scm | 58 ++++++++++++++----------------------------
 1 file changed, 19 insertions(+), 39 deletions(-)

diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm
index 0d5531c..005157b 100644
--- a/guix/build/qt-build-system.scm
+++ b/guix/build/qt-build-system.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
-;;; Copyright © 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;;
@@ -49,45 +49,25 @@
 
 (define (variables-for-wrapping base-directories)
 
-  (define (collect-sub-dirs base-directories subdirectory
-                            selectors)
-    ;; Append SUBDIRECTORY and each of BASE-DIRECTORIES, and return the subset
-    ;; that exists and has at least one of the SELECTORS sub-directories,
-    ;; unless SELECTORS is the empty list.
-    (filter-map (lambda (dir)
-                  (let ((directory (string-append dir subdirectory)))
-                    (and (directory-exists? directory)
-                         (or (null? selectors)
-                             (any (lambda (selector)
-                                    (directory-exists?
-                                     (string-append directory selector)))
-                                  selectors))
-                         directory)))
-                base-directories))
-
-  (filter-map
-   (match-lambda
-     ((variable directory selectors ...)
-      (match (collect-sub-dirs base-directories directory
-                               selectors)
-        (()
-         #f)
-        (directories
-         `(,variable = ,directories)))))
-
-   ;; These shall match the search-path-specification for Qt and KDE
-   ;; libraries.
-   (list '("XDG_DATA_DIRS" "/share"
+  (define (collect-sub-dirs base-directories subdirectory)
+    (filter-map
+     (lambda (dir)
+       (let ((directory (string-append dir subdirectory)))
+         (if (directory-exists? directory) directory #f)))
+     base-directories))
 
-           ;; These are "selectors": consider /share if and only if at least
-           ;; one of these sub-directories exist.  This avoids adding
-           ;; irrelevant packages to XDG_DATA_DIRS just because they have a
-           ;; /share sub-directory.
-           "/glib-2.0/schemas" "/sounds" "/themes"
-           "/cursors" "/wallpapers" "/icons" "/mime")
-         '("XDG_CONFIG_DIRS" "/etc/xdg")
-         '("QT_PLUGIN_PATH" "/lib/qt5/plugins")
-         '("QML2_IMPORT_PATH" "/lib/qt5/qml"))))
+  (filter
+   (lambda (var-to-wrap) (not (null? (last var-to-wrap))))
+   (map
+    (lambda (var-spec)
+      `(,(first var-spec) = ,(collect-sub-dirs base-directories (last 
var-spec))))
+    (list
+     ;; these shall match the search-path-specification for Qt and KDE
+     ;; libraries
+     '("XDG_DATA_DIRS" "/share")
+     '("XDG_CONFIG_DIRS" "/etc/xdg")
+     '("QT_PLUGIN_PATH" "/lib/qt5/plugins")
+     '("QML2_IMPORT_PATH" "/lib/qt5/qml")))))
 
 (define* (wrap-all-programs #:key inputs outputs
                             (qt-wrap-excluded-outputs '())



reply via email to

[Prev in Thread] Current Thread [Next in Thread]