mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
qtbase: setup required environment in GTK3 platform theme plugin
This commit is contained in:
parent
c816bbc8a8
commit
5a8295e596
4 changed files with 45 additions and 1 deletions
|
@ -94,6 +94,7 @@ let
|
|||
qtbase = callPackage ./qtbase {
|
||||
inherit (srcs.qtbase) src version;
|
||||
inherit bison cups harfbuzz mesa;
|
||||
inherit dconf gtk3;
|
||||
inherit developerBuild decryptSslTraffic;
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# darwin support
|
||||
darwin, libiconv, libcxx,
|
||||
|
||||
dbus, fontconfig, freetype, glib, gtk3, harfbuzz, icu, libX11, libXcomposite,
|
||||
dbus, dconf, fontconfig, freetype, glib, gtk3, harfbuzz, icu, libX11, libXcomposite,
|
||||
libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libtiff,
|
||||
libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre16, sqlite, udev,
|
||||
xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm, xlibs,
|
||||
|
@ -147,6 +147,12 @@ stdenv.mkDerivation {
|
|||
++ lib.optional mesaSupported
|
||||
''-DNIXPKGS_MESA_GL="${mesa.out}/lib/libGL"''
|
||||
|
||||
++ lib.optionals (!stdenv.isDarwin)
|
||||
[
|
||||
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
||||
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
|
||||
]
|
||||
|
||||
++ lib.optionals stdenv.isDarwin
|
||||
[
|
||||
"-D__MAC_OS_X_VERSION_MAX_ALLOWED=1090"
|
||||
|
|
36
pkgs/development/libraries/qt-5/5.8/qtbase/qgtk-env.patch
Normal file
36
pkgs/development/libraries/qt-5/5.8/qtbase/qgtk-env.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
Index: qtbase-opensource-src-5.8.0/src/plugins/platformthemes/gtk3/main.cpp
|
||||
===================================================================
|
||||
--- qtbase-opensource-src-5.8.0.orig/src/plugins/platformthemes/gtk3/main.cpp
|
||||
+++ qtbase-opensource-src-5.8.0/src/plugins/platformthemes/gtk3/main.cpp
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <qpa/qplatformthemeplugin.h>
|
||||
#include "qgtk3theme.h"
|
||||
+#include <QFile>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -54,8 +55,22 @@ public:
|
||||
QPlatformTheme *QGtk3ThemePlugin::create(const QString &key, const QStringList ¶ms)
|
||||
{
|
||||
Q_UNUSED(params);
|
||||
- if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive))
|
||||
+ if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) {
|
||||
+
|
||||
+#ifdef NIXPKGS_QGTK3_XDG_DATA_DIRS
|
||||
+ QStringList XDG_DATA_DIRS = QFile::decodeName(qgetenv("XDG_DATA_DIRS")).split(':');
|
||||
+ XDG_DATA_DIRS << QStringLiteral(NIXPKGS_QGTK3_XDG_DATA_DIRS);
|
||||
+ qputenv("XDG_DATA_DIRS", QFile::encodeName(XDG_DATA_DIRS.join(':')));
|
||||
+#endif
|
||||
+
|
||||
+#ifdef NIXPKGS_QGTK3_GIO_EXTRA_MODULES
|
||||
+ QStringList GIO_EXTRA_MODULES = QFile::decodeName(qgetenv("GIO_EXTRA_MODULES")).split(':');
|
||||
+ GIO_EXTRA_MODULES << QStringLiteral(NIXPKGS_QGTK3_GIO_EXTRA_MODULES);
|
||||
+ qputenv("GIO_EXTRA_MODULES", QFile::encodeName(GIO_EXTRA_MODULES.join(':')));
|
||||
+#endif
|
||||
+
|
||||
return new QGtk3Theme;
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -8,3 +8,4 @@ qpa-platform-plugin-path.patch
|
|||
dlopen-gl.patch
|
||||
compose-search-path.patch
|
||||
cmake-paths.patch
|
||||
qgtk-env.patch
|
||||
|
|
Loading…
Reference in a new issue