GNU bug report logs -
#66099
[PATCH gnome-team 0/3] Update upower
Previous Next
Reported by: Vivien Kraus <vivien <at> planete-kraus.eu>
Date: Tue, 19 Sep 2023 11:40:01 UTC
Severity: normal
Tags: patch
Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #65 received at 66099 <at> debbugs.gnu.org (full text, mbox):
The new eudev introduced an index for a hardware database. This index file
must be unique.
* guix/profiles.scm (udev-hwdb-bin): New profile hook to generate hwdb.bin.
(%default-profile-hooks): Register it here.
---
guix/profiles.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index c88672c25a..d308e7fb88 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1905,6 +1905,34 @@ (define (texlive-font-maps manifest)
(hook . texlive-font-maps)))
(return #f))))
+(define (udev-hwdb-bin manifest)
+ "Return a derivation that builds lib/udev/hwdb.bin."
+ (define eudev
+ (module-ref (resolve-interface '(gnu packages linux)) 'eudev))
+ (define build
+ (with-imported-modules
+ (source-module-closure '((guix build utils)))
+ #~(begin
+ (use-modules (guix build utils))
+ (let* ((inputs '#$(manifest-inputs manifest))
+ (hwdb-directories
+ (filter
+ file-exists?
+ (map (lambda (directory)
+ (string-append directory "/lib/udev/hwdb.d"))
+ inputs))))
+ (setenv "UDEV_HWDB_PATH"
+ (string-join hwdb-directories ":")))
+ (invoke #$(file-append eudev "/bin/udevadm")
+ "hwdb" "--update"
+ "-o" (string-append #$output "/lib/udev/hwdb.bin")))))
+ (gexp->derivation "udev-hwdb-bin" build
+ #:substitutable? #f
+ #:local-build? #t
+ #:properties
+ `((type . profile-hook)
+ (hook . udev-hwdb-bin))))
+
(define %default-profile-hooks
;; This is the list of derivation-returning procedures that are called by
;; default when making a non-empty profile.
@@ -1919,6 +1947,7 @@ (define %default-profile-hooks
gtk-icon-themes
gtk-im-modules
texlive-font-maps
+ udev-hwdb-bin
xdg-desktop-database
xdg-mime-database))
--
2.41.0
This bug report was last modified 1 year and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.