Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40447 from ttuegel/bugfix/18.03/kde-gtk-config/gs…
…ettings kde-gtk-config: Set path for GSettings schemas
- Loading branch information
Showing
4 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
{ | ||
mkDerivation, | ||
extra-cmake-modules, | ||
extra-cmake-modules, wrapGAppsHook, | ||
glib, gtk2, gtk3, karchive, kcmutils, kconfigwidgets, ki18n, kiconthemes, kio, | ||
knewstuff, gsettings-desktop-schemas | ||
}: | ||
|
||
mkDerivation { | ||
name = "kde-gtk-config"; | ||
nativeBuildInputs = [ extra-cmake-modules ]; | ||
nativeBuildInputs = [ extra-cmake-modules wrapGAppsHook ]; | ||
dontWrapGApps = true; # There is nothing to wrap | ||
buildInputs = [ | ||
ki18n kio glib gtk2 gtk3 karchive kcmutils kconfigwidgets kiconthemes | ||
knewstuff gsettings-desktop-schemas | ||
]; | ||
patches = [ ./0001-follow-symlinks.patch ]; | ||
patches = [ ./patches/follow-symlinks.patch ./patches/gsettings.patch ]; | ||
cmakeFlags = [ | ||
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" | ||
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" | ||
"-DGLIB_SCHEMAS_DIR=${gsettings-desktop-schemas.out}/" | ||
]; | ||
preConfigure = '' | ||
NIX_CFLAGS_COMPILE+=" -DGSETTINGS_SCHEMAS_PATH=\"$GSETTINGS_SCHEMAS_PATH\"" | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Index: kde-gtk-config-5.12.4/src/gtkconfigkcmodule.cpp | ||
=================================================================== | ||
--- kde-gtk-config-5.12.4.orig/src/gtkconfigkcmodule.cpp | ||
+++ kde-gtk-config-5.12.4/src/gtkconfigkcmodule.cpp | ||
@@ -78,6 +78,16 @@ GTKConfigKCModule::GTKConfigKCModule(QWi | ||
m_iconsModel = new IconThemesModel(false, this); | ||
ui->cb_icon->setModel(m_iconsModel); | ||
ui->cb_icon_fallback->setModel(m_iconsModel); | ||
+ | ||
+ // Add GSETTINGS_SCHEMAS_PATH to the front of XDG_DATA_DIRS. | ||
+ // Normally this would be done by wrapGAppsHook, but this plugin | ||
+ // (shared object) cannot be wrapped. | ||
+ QByteArray xdgdata = qgetenv("XDG_DATA_DIRS"); | ||
+ if (!xdgdata.isEmpty()) { | ||
+ xdgdata.push_front(":"); | ||
+ } | ||
+ xdgdata.push_front(QByteArray(GSETTINGS_SCHEMAS_PATH)); | ||
+ qputenv("XDG_DATA_DIRS", xdgdata); | ||
|
||
m_tempGtk2Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/gtkrc-2.0"; | ||
m_tempGtk3Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/.config/gtk-3.0/settings.ini"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
follow-symlinks.patch | ||
gsettings.patch |