h-client: Do not fail in pure environments.
Fixes <https://issues.guix.gnu.org/56223>. * gnu/packages/hardware.scm (h-client)[imported-modules]: New argument. [modules]: Likewise. [phases]{generate-gdk-pixbuf-loaders-cache-file} {glib-or-gtk-compile-schemas, glib-or-gtk-wrap}: Add glib-or-gtk phases. {wrap-more}: Wrap GI_TYPELIB_PATH and PATH. [inputs]: Add gobject-introspection and guile-3.0. Reported-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
b5e85191f9
commit
8d810c209f
1 changed files with 29 additions and 0 deletions
|
|
@ -84,6 +84,7 @@
|
||||||
#:use-module (gnu packages xml)
|
#:use-module (gnu packages xml)
|
||||||
#:use-module (gnu packages xorg)
|
#:use-module (gnu packages xorg)
|
||||||
#:use-module (guix build-system cmake)
|
#:use-module (guix build-system cmake)
|
||||||
|
#:use-module (guix build-system glib-or-gtk)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system meson)
|
#:use-module (guix build-system meson)
|
||||||
#:use-module (guix build-system perl)
|
#:use-module (guix build-system perl)
|
||||||
|
|
@ -598,8 +599,36 @@ human-readable format and checks if it conforms to the standards.")
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0hm86d51kj5r3yxq4c23aa57cs8igz3wrkbjn20z4frx75rpf46m"))))
|
(base32 "0hm86d51kj5r3yxq4c23aa57cs8igz3wrkbjn20z4frx75rpf46m"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:imported-modules `(,@%python-build-system-modules
|
||||||
|
,@%glib-or-gtk-build-system-modules)
|
||||||
|
#:modules '(((guix build glib-or-gtk-build-system) #:prefix glib:)
|
||||||
|
(guix build python-build-system)
|
||||||
|
(guix build utils))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
|
||||||
|
(assoc-ref glib:%standard-phases
|
||||||
|
'generate-gdk-pixbuf-loaders-cache-file))
|
||||||
|
(add-after 'install 'glib-or-gtk-compile-schemas
|
||||||
|
(assoc-ref glib:%standard-phases 'glib-or-gtk-compile-schemas))
|
||||||
|
(add-after 'install 'glib-or-gtk-wrap
|
||||||
|
(assoc-ref glib:%standard-phases 'glib-or-gtk-wrap))
|
||||||
|
(add-after 'glib-or-gtk-wrap 'wrap-more
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(wrap-script (search-input-file outputs "bin/h-client")
|
||||||
|
;; Wrap GI_TYPELIB_PATH to avoid the error "ValueError:
|
||||||
|
;; Namespace GdkPixbuf not available".
|
||||||
|
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
|
||||||
|
`("PATH" = (,(dirname (search-input-file
|
||||||
|
inputs "sbin/lspci"))
|
||||||
|
,(dirname (search-input-file
|
||||||
|
inputs "bin/lsusb"))))))))))
|
||||||
(inputs
|
(inputs
|
||||||
(list gdk-pixbuf
|
(list gdk-pixbuf
|
||||||
|
gobject-introspection ;for GI_TYPELIB_PATH
|
||||||
|
guile-3.0
|
||||||
gtk+
|
gtk+
|
||||||
pciutils
|
pciutils
|
||||||
python-pycurl
|
python-pycurl
|
||||||
|
|
|
||||||
Reference in a new issue