summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2025-02-12 13:55:06 +0800
committerZheng Junjie <z572@z572.online>2025-07-06 19:00:08 +0800
commit5dfd960b417a8106021aee1f613ff20083328542 (patch)
treeb51e442f94fb7ca3f580c89d61c542c450b410bd
parentcc0c679df729547c0db4aaf6dd2be175b32174d1 (diff)
gnu: qtbase: Use shared-mime-info as the default MIME type database.
* gnu/packages/qt.scm (qtbase) [inputs]: Add shared-mime-info. [arguments] <patch-more-paths>: Patch locateMimeDirectories to lookup in shared-mime-info. Change-Id: I6596b1b2f56a2e5c66f751d3feb52fdfac4e4b85
-rw-r--r--gnu/packages/qt.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 5e83a6ad58..9c04db7c45 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -892,7 +892,15 @@ tst_qt_cmake_create.cpp"
(substitute* "src/corelib/CMakeLists.txt"
(("/bin/ls")
- (search-input-file inputs "bin/ls")))))
+ (search-input-file inputs "bin/ls")))
+
+ ;; Use shared-mime-info as the default MIME type database.
+ (substitute* "src/corelib/mimetypes/qmimedatabase.cpp"
+ (("return dirs;" all)
+ (string-append
+ "dirs.append(\""
+ #$(this-package-input "shared-mime-info") "/share/mime"
+ "\");\n" all)))))
(delete 'do-not-capture-python) ;move after patch-source-shebangs
(add-after 'patch-source-shebangs 'do-not-capture-python
(lambda _
@@ -1192,6 +1200,7 @@ tst_qt_cmake_create.cpp"
libsm
libxcb
libxext
+ shared-mime-info
xcb-util-cursor
`(,zstd "lib"))))
(native-search-paths