summaryrefslogtreecommitdiff
path: root/gnu/packages/wxwidgets.scm
diff options
context:
space:
mode:
authorKei Kebreau <kkebreau@posteo.net>2020-07-30 23:21:45 -0400
committerKei Kebreau <kkebreau@posteo.net>2020-08-16 17:31:09 -0400
commit93d9737d2b0dc3650b8b967b0bfdef86ea9ecee2 (patch)
tree3e668cf73b0775682ac8475a48d3a2f6f6f7bab3 /gnu/packages/wxwidgets.scm
parente79fe4f675dc7e56e3d5058cca5aef9fb2efe785 (diff)
gnu: wxwidgets: Fix MIME type loading.
* gnu/packages/wxwidgets.scm (wxwidgets)[inputs]: Add shared-mime-info. [arguments]: Update 'refer-to-inputs phase so wxwidgets looks in the correct directory for MIME type information.
Diffstat (limited to 'gnu/packages/wxwidgets.scm')
-rw-r--r--gnu/packages/wxwidgets.scm16
1 files changed, 11 insertions, 5 deletions
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 7141b2f4b8..f3a7fdd7a4 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -37,6 +37,7 @@
#:use-module (gnu packages databases)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gl)
+ #:use-module (gnu packages gnome)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
@@ -75,6 +76,7 @@
("mesa" ,mesa)
("webkitgtk" ,webkitgtk)
("sdl" ,sdl)
+ ("shared-mime-info" ,shared-mime-info)
("xdg-utils" ,xdg-utils)))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -97,11 +99,15 @@
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'refer-to-inputs
- (lambda _
- (substitute* "src/unix/utilsx11.cpp"
- (("wxExecute\\(xdg_open \\+")
- (string-append "wxExecute(\"" (which "xdg-open") "\"")))
- #t)))))
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((mime (string-append (assoc-ref inputs "shared-mime-info")
+ "/share/mime")))
+ (substitute* "src/unix/utilsx11.cpp"
+ (("wxExecute\\(xdg_open \\+")
+ (string-append "wxExecute(\"" (which "xdg-open") "\"")))
+ (substitute* "src/unix/mimetype.cpp"
+ (("/usr(/local)?/share/mime") mime))
+ #t))))))
(home-page "https://www.wxwidgets.org/")
(synopsis "Widget toolkit for creating graphical user interfaces")
(description