gnu: piper: Fix runtime.
The wrapper script does not add piper's own Python files to GUIX_PYTHONPATH. Copy the approach from gtg to solve this. Traceback (most recent call last): File "/gnu/store/9fq062kva6ffidilg0qn8liqn6a8yf1w-piper-0.6/bin/.piper-real", line 36, in <module> from piper.application import Application ModuleNotFoundError: No module named 'piper' * gnu/packages/gnome.scm (piper): Fix runtime. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>master
parent
5ed679a2a9
commit
283afa44b5
|
@ -12193,26 +12193,25 @@ your operating-system definition:
|
||||||
python-pycairo
|
python-pycairo
|
||||||
python-pygobject))
|
python-pygobject))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:imported-modules ((guix build python-build-system)
|
(list #:glib-or-gtk? #t
|
||||||
,@%meson-build-system-modules)
|
#:tests? #f ;; The flake8 test fails trying to validate piper.in as code.
|
||||||
#:modules (((guix build python-build-system) #:prefix python:)
|
#:phases
|
||||||
(guix build meson-build-system)
|
#~(modify-phases %standard-phases
|
||||||
(guix build utils))
|
(add-after 'unpack 'dont-update-gtk-icon-cache
|
||||||
#:tests? #f ;; The flake8 test fails trying to validate piper.in as code.
|
(lambda _
|
||||||
#:phases
|
(substitute* "meson.build"
|
||||||
(modify-phases %standard-phases
|
(("meson.add_install_script('meson_install.sh')") ""))))
|
||||||
(add-after 'unpack 'dont-update-gtk-icon-cache
|
(add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "meson.build"
|
(let ((pylib (string-append #$output
|
||||||
(("meson.add_install_script('meson_install.sh')") ""))))
|
"/lib/python"
|
||||||
;; TODO: Switch to wrap-script when it is fixed.
|
#$(version-major+minor
|
||||||
(add-after 'install 'wrap-python
|
(package-version python))
|
||||||
(assoc-ref python:%standard-phases 'wrap))
|
"/site-packages")))
|
||||||
(add-after 'wrap-python 'wrap
|
(wrap-program
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(string-append #$output "/bin/piper")
|
||||||
(wrap-program
|
`("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
|
||||||
(string-append (assoc-ref outputs "out" )"/bin/piper")
|
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))))
|
||||||
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))
|
|
||||||
(home-page "https://github.com/libratbag/piper/")
|
(home-page "https://github.com/libratbag/piper/")
|
||||||
(synopsis "Configure bindings and LEDs on gaming mice")
|
(synopsis "Configure bindings and LEDs on gaming mice")
|
||||||
(description "Piper is a GTK+ application for configuring gaming mice with
|
(description "Piper is a GTK+ application for configuring gaming mice with
|
||||||
|
|
Reference in New Issue