[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: wxwidgets: Fix MIME type loading.
From: |
guix-commits |
Subject: |
02/02: gnu: wxwidgets: Fix MIME type loading. |
Date: |
Sun, 16 Aug 2020 17:31:40 -0400 (EDT) |
kkebreau pushed a commit to branch master
in repository guix.
commit 93d9737d2b0dc3650b8b967b0bfdef86ea9ecee2
Author: Kei Kebreau <kkebreau@posteo.net>
AuthorDate: Thu Jul 30 23:21:45 2020 -0400
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.
---
gnu/packages/wxwidgets.scm | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 7141b2f..f3a7fdd 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