@@ -5727,7 +5727,7 @@ (define-public geocode-glib-with-libsoup2
(define-public upower
(package
(name "upower")
- (version "1.90.0")
+ (version "1.90.2")
(source
(origin
(method git-fetch)
@@ -5736,7 +5736,7 @@ (define-public upower
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1g17rm91p8vfpjyb0k2shylrs55nccn3fa890vlk4n9s71sghbzq"))
+ (base32 "13xp423ycv8imf2cmgf6lii9f01p7x2v19cny7acrmczkc0cqv7d"))
(modules '((guix build utils)))
(snippet
;; Upstream commit <https://cgit.freedesktop.org/upower/commit/
@@ -5759,19 +5759,41 @@ (define-public upower
;; If not specified, udev will try putting history information
;; in /gnu/store.
"-Dhistorydir=/var/lib/upower"
- (string-append "-Dudevrulesdir=" #$output "/bin/udev/rules.d"))
- #:phases (if (target-x86-32?)
- #~(modify-phases %standard-phases
- (add-after 'unpack 'adjust-test-for-excess-precision
- (lambda _
- ;; Address test failure caused by excess precision
- ;; on i686:
- ;; <https://gitlab.freedesktop.org/upower/upower/-/issues/214>.
- (substitute* "src/linux/integration-test.py"
- (("assertEqual(.*)40\\.0" _ middle)
- (string-append
- "assertAlmostEqual" middle "40.0"))))))
- #~%standard-phases)))
+ (string-append "-Dudevrulesdir=" #$output "/bin/udev/rules.d")
+ (string-append "-Dudevhwdbdir=" #$output "/lib/udev/hwdb.d"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'adjust-test-for-excess-precision
+ (lambda _
+ #$@(if (target-x86-32?)
+ ;; Address test failure caused by excess precision
+ ;; on i686:
+ ;; <https://gitlab.freedesktop.org/upower/upower/-/issues/214>.
+ '((substitute* "src/linux/integration-test.py"
+ (("assertEqual(.*)40\\.0" _ middle)
+ (string-append
+ "assertAlmostEqual" middle "40.0"))))
+ '(*unspecified*))))
+ (delete 'check) ;; move after the install phase
+ (add-after 'install 'check
+ (lambda* (#:key parallel-tests? tests? #:allow-other-keys)
+ (when tests?
+ (setenv "UDEV_HWDB_PATH"
+ (apply string-append #$output "/lib/udev/hwdb.d"
+ (let ((p (getenv "HWDB_BIN_PATH")))
+ (if p
+ (list ":" p)
+ '()))))
+ (let ((hwdb.bin (string-append (getcwd) "/test-hwdb.bin")))
+ (invoke "udevadm" "hwdb" "--update"
+ "-o" hwdb.bin)
+ (setenv "UDEV_HWDB_BIN" hwdb.bin))
+ (setenv "MESON_TESTTHREADS"
+ (if parallel-tests?
+ (number->string (parallel-job-count))
+ "1"))
+ (invoke "dbus-run-session" "--"
+ "meson" "test" "-t" "0")))))))
(native-inputs
(list `(,glib "bin") ; for gdbus-codegen
gobject-introspection