diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2018-05-12 20:23:09 -0500 |
---|---|---|
committer | Thomas Tuegel <ttuegel@mailbox.org> | 2018-05-12 20:35:25 -0500 |
commit | 1c3492f358f1073253823b76134e24f0d335647a (patch) | |
tree | 5b44df5b0979286ac0fe741176ee1016c6ae1432 /pkgs/desktops/plasma-5/kde-gtk-config | |
parent | 6db7f92cc2af827e8b8b181bf5ed828a1d0f141d (diff) |
kde-gtk-config: Set path for GSettings schemas
Fixes: #38919 The KCModule is patched to set the appropriate environment variables in the parent process when it is initialized.
Diffstat (limited to 'pkgs/desktops/plasma-5/kde-gtk-config')
-rw-r--r-- | pkgs/desktops/plasma-5/kde-gtk-config/default.nix | 10 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/kde-gtk-config/patches/follow-symlinks.patch (renamed from pkgs/desktops/plasma-5/kde-gtk-config/0001-follow-symlinks.patch) | 35 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch | 21 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/kde-gtk-config/patches/series | 2 |
4 files changed, 46 insertions, 22 deletions
diff --git a/pkgs/desktops/plasma-5/kde-gtk-config/default.nix b/pkgs/desktops/plasma-5/kde-gtk-config/default.nix index 35d90a246bc6c..8cfc947d30bdc 100644 --- a/pkgs/desktops/plasma-5/kde-gtk-config/default.nix +++ b/pkgs/desktops/plasma-5/kde-gtk-config/default.nix @@ -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\"" + ''; } diff --git a/pkgs/desktops/plasma-5/kde-gtk-config/0001-follow-symlinks.patch b/pkgs/desktops/plasma-5/kde-gtk-config/patches/follow-symlinks.patch index d610d19eedd22..f30a0a4588fa1 100644 --- a/pkgs/desktops/plasma-5/kde-gtk-config/0001-follow-symlinks.patch +++ b/pkgs/desktops/plasma-5/kde-gtk-config/patches/follow-symlinks.patch @@ -8,11 +8,11 @@ Subject: [PATCH] follow symlinks src/iconthemesmodel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/src/appearancegtk2.cpp b/src/appearancegtk2.cpp -index b1e0b52..095cddc 100644 ---- a/src/appearancegtk2.cpp -+++ b/src/appearancegtk2.cpp -@@ -73,7 +73,7 @@ QString AppearanceGTK2::themesGtkrcFile(const QString& themeName) const +Index: kde-gtk-config-5.12.4/src/appearancegtk2.cpp +=================================================================== +--- kde-gtk-config-5.12.4.orig/src/appearancegtk2.cpp ++++ kde-gtk-config-5.12.4/src/appearancegtk2.cpp +@@ -69,7 +69,7 @@ QString AppearanceGTK2::themesGtkrcFile( QStringList themes=installedThemes(); themes=themes.filter(QRegExp("/"+themeName+"/?$")); if(themes.size()==1) { @@ -21,12 +21,12 @@ index b1e0b52..095cddc 100644 while(it.hasNext()) { it.next(); if(it.fileName()=="gtkrc") { -diff --git a/src/iconthemesmodel.cpp b/src/iconthemesmodel.cpp -index 07c7ad7..b04d978 100644 ---- a/src/iconthemesmodel.cpp -+++ b/src/iconthemesmodel.cpp -@@ -46,7 +46,7 @@ QList<QDir> IconThemesModel::installedThemesPaths() - +Index: kde-gtk-config-5.12.4/src/iconthemesmodel.cpp +=================================================================== +--- kde-gtk-config-5.12.4.orig/src/iconthemesmodel.cpp ++++ kde-gtk-config-5.12.4/src/iconthemesmodel.cpp +@@ -47,7 +47,7 @@ QList<QDir> IconThemesModel::installedTh + foreach(const QString& dir, dirs) { QDir userIconsDir(dir); - QDirIterator it(userIconsDir.path(), QDir::NoDotAndDotDot|QDir::AllDirs|QDir::NoSymLinks); @@ -34,14 +34,11 @@ index 07c7ad7..b04d978 100644 while(it.hasNext()) { QString currentPath = it.next(); QDir dir(currentPath); --- -2.6.2 - -diff --git a/src/cursorthemesmodel.cpp b/src/cursorthemesmodel.cpp -index 926a666..85b10f8 100644 ---- a/src/cursorthemesmodel.cpp -+++ b/src/cursorthemesmodel.cpp -@@ -47,7 +47,7 @@ QList<QDir> CursorThemesModel::installedThemesPaths() +Index: kde-gtk-config-5.12.4/src/cursorthemesmodel.cpp +=================================================================== +--- kde-gtk-config-5.12.4.orig/src/cursorthemesmodel.cpp ++++ kde-gtk-config-5.12.4/src/cursorthemesmodel.cpp +@@ -47,7 +47,7 @@ QList<QDir> CursorThemesModel::installed foreach(const QString& dir, dirs) { QDir userIconsDir(dir); diff --git a/pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch b/pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch new file mode 100644 index 0000000000000..b4bc89d59e9ee --- /dev/null +++ b/pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch @@ -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"; diff --git a/pkgs/desktops/plasma-5/kde-gtk-config/patches/series b/pkgs/desktops/plasma-5/kde-gtk-config/patches/series new file mode 100644 index 0000000000000..7aad1acf6ac44 --- /dev/null +++ b/pkgs/desktops/plasma-5/kde-gtk-config/patches/series @@ -0,0 +1,2 @@ +follow-symlinks.patch +gsettings.patch |