Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] plasma5: 5.17.5 -> 5.18.5 #84542

Merged
merged 16 commits into from Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/desktops/plasma-5/fetch.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
WGET_ARGS=( https://download.kde.org/stable/plasma/5.17.5/ )
WGET_ARGS=( https://download.kde.org/stable/plasma/5.18.5/ )
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/kded/gtkconfig.cpp b/kded/gtkconfig.cpp
index 5303636..199c4d5 100644
--- a/kded/gtkconfig.cpp
+++ b/kded/gtkconfig.cpp
@@ -41,6 +41,16 @@ GtkConfig::GtkConfig(QObject *parent, const QVariantList&) :
kdeglobalsConfigWatcher(KConfigWatcher::create(KSharedConfig::openConfig(QStringLiteral("kdeglobals")))),
kwinConfigWatcher(KConfigWatcher::create(KSharedConfig::openConfig(QStringLiteral("kwinrc"))))
{
+ // 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);
+
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.registerService(QStringLiteral("org.kde.GtkConfig"));
dbus.registerObject(QStringLiteral("/GtkConfig"), this, QDBusConnection::ExportScriptableSlots);
8 changes: 5 additions & 3 deletions pkgs/desktops/plasma-5/kde-gtk-config/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mkDerivation,
extra-cmake-modules, wrapGAppsHook,
glib, gtk2, gtk3, karchive, kcmutils, kconfigwidgets, ki18n, kiconthemes, kio,
knewstuff, gsettings-desktop-schemas
knewstuff, gsettings-desktop-schemas, xsettingsd
}:

mkDerivation {
Expand All @@ -11,14 +11,16 @@ mkDerivation {
dontWrapGApps = true; # There is nothing to wrap
buildInputs = [
ki18n kio glib gtk2 gtk3 karchive kcmutils kconfigwidgets kiconthemes
knewstuff gsettings-desktop-schemas
knewstuff gsettings-desktop-schemas xsettingsd
];
patches = [ ./patches/follow-symlinks.patch ./patches/gsettings.patch ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we confirmed that these packages are actually not necessary? I recall, in particular, that kde-gtk-config was completely broken without follow-symlinks.patch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to this comment on the state of gtk-config:

I could use some help with the gtk config page.
The plasma kde-gtk-config module was mostly rewritten from scratch. The menu was moved to the other Application Style code, and kde-gtk-config now only contains a kded plugin. If the settings menu detects that the kded kde-gtk-config module is loaded, it will show the settings page.
I don't know how to figure out if the kded module has been loaded or where exactly the problem is, but the settings page is not shown.

So no, without patches it doesn't work, but since source was 100% replaced with new code upstream, the patches won't apply and can not be easily rewritten.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The answer to your question is: No, we haven't confirmed. Quite the opposite, we have confirmed that it doesn't work without patches, which is also the reason why figuring out the new way to do this is part of the todo list in the initial comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I recall, the patches mainly affected the code for the settings menu. The code that needs to be patched has probably moved to systemsettings. I guess we may also need to patch the kded module, but I can't imagine what that module is actually doing: setting the GTK theme is a matter of writing a few static files, so I don't know why we need a running daemon to do that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more information on this new "Plasma GTKd" is available here:
https://phabricator.kde.org/D24743

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the new settings page is added here: https://phabricator.kde.org/D26583

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the new code already follows symlinks, at least the only place where I can find something that looks similar to the code that was previously patched (plasma-desktop/kcms/style/gtkthemesmodel.cpp L. 154) uses QDir().entryList without passing QDir::NoSymlinks.

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}/"
];
# The gtkconfig KDED module will crash the daemon if the GSettings schemas
# aren't found.
patches = [ ./0001-gsettings-schemas-path.patch ];
preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DGSETTINGS_SCHEMAS_PATH=\"$GSETTINGS_SCHEMAS_PATH\""
'';
Expand Down

This file was deleted.

21 changes: 0 additions & 21 deletions pkgs/desktops/plasma-5/kde-gtk-config/patches/gsettings.patch

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/desktops/plasma-5/kde-gtk-config/patches/series

This file was deleted.

13 changes: 7 additions & 6 deletions pkgs/desktops/plasma-5/kdeplasma-addons.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
mkDerivation,
extra-cmake-modules, kdoctools,
kconfig, kconfigwidgets, kcoreaddons, kcmutils, kdelibs4support, kio,
knewstuff, kross, krunner, kservice, ksysguard, kunitconversion, ibus,
plasma-framework, plasma-workspace, qtdeclarative, qtx11extras, kholidays
kconfig, kconfigwidgets, kcoreaddons, kcmutils, kdelibs4support, kholidays,
kio, knewstuff, kpurpose, kross, krunner, kservice, ksysguard,
kunitconversion, ibus, plasma-framework, plasma-workspace, qtdeclarative,
qtwebengine, qtx11extras
}:

mkDerivation {
name = "kdeplasma-addons";
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
kconfig kconfigwidgets kcoreaddons kcmutils kdelibs4support kio knewstuff
kross krunner kservice ksysguard kunitconversion ibus plasma-framework
plasma-workspace qtdeclarative qtx11extras kholidays
kconfig kconfigwidgets kcoreaddons kcmutils kdelibs4support kholidays kio
knewstuff kpurpose kross krunner kservice ksysguard kunitconversion ibus
plasma-framework plasma-workspace qtdeclarative qtwebengine qtx11extras
];
}
9 changes: 5 additions & 4 deletions pkgs/desktops/plasma-5/kinfocenter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
mkDerivation,
extra-cmake-modules, kdoctools,
kcmutils, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons,
kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kpackage, kservice,
kwayland, kwidgetsaddons, kxmlgui, libraw1394, libGLU, pciutils, solid
kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kirigami2, kpackage,
kservice, kwayland, kwidgetsaddons, kxmlgui, libraw1394, libGLU, pciutils,
solid
}:

mkDerivation {
name = "kinfocenter";
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
kdeclarative kdelibs4support ki18n kiconthemes kio kpackage kservice
kwayland kwidgetsaddons kxmlgui libraw1394 libGLU pciutils solid
kdeclarative kdelibs4support ki18n kiconthemes kio kirigami2 kpackage
kservice kwayland kwidgetsaddons kxmlgui libraw1394 libGLU pciutils solid
];
}
76 changes: 0 additions & 76 deletions pkgs/desktops/plasma-5/kscreen-417316.patch

This file was deleted.

5 changes: 2 additions & 3 deletions pkgs/desktops/plasma-5/kscreen.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
mkDerivation,
extra-cmake-modules,
kconfig, kcmutils, kconfigwidgets, kdbusaddons, kglobalaccel, ki18n,
kwidgetsaddons, kxmlgui, libkscreen, qtdeclarative, qtgraphicaleffects,
kwidgetsaddons, kxmlgui, libkscreen, qtdeclarative, qtgraphicaleffects, qtsensors,
kwindowsystem, kdeclarative, plasma-framework
}:

mkDerivation {
name = "kscreen";
patches = [ ./kscreen-417316.patch ];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [
kconfig kcmutils kconfigwidgets kdbusaddons kglobalaccel ki18n
kwidgetsaddons kxmlgui libkscreen qtdeclarative qtgraphicaleffects
kwidgetsaddons kxmlgui libkscreen qtdeclarative qtgraphicaleffects qtsensors
kwindowsystem kdeclarative plasma-framework
];
}
4 changes: 2 additions & 2 deletions pkgs/desktops/plasma-5/ksysguard.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
mkDerivation,
extra-cmake-modules, kdoctools,
lm_sensors,
libcap, libpcap, lm_sensors,
kconfig, kcoreaddons, kdelibs4support, ki18n, kiconthemes, kitemviews,
knewstuff, libksysguard
}:
Expand All @@ -11,6 +11,6 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
kconfig kcoreaddons kitemviews knewstuff kiconthemes libksysguard
kdelibs4support ki18n lm_sensors
kdelibs4support ki18n libcap libpcap lm_sensors
];
}
8 changes: 5 additions & 3 deletions pkgs/desktops/plasma-5/kwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
epoxy,libICE, libSM, libinput, libxkbcommon, udev, wayland, xcb-util-cursor,
xwayland,

qtdeclarative, qtmultimedia, qtscript, qtx11extras,
qtdeclarative, qtmultimedia, qtquickcontrols2, qtscript, qtsensors,
qtvirtualkeyboard, qtx11extras,

breeze-qt5, kactivities, kcompletion, kcmutils, kconfig, kconfigwidgets,
kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel, ki18n,
kiconthemes, kidletime, kinit, kio, knewstuff, knotifications, kpackage,
kscreenlocker, kservice, kwayland, kwidgetsaddons, kwindowsystem, kxmlgui,
plasma-framework, qtsensors, libcap, libdrm, mesa
plasma-framework, libcap, libdrm, mesa
}:

# TODO (ttuegel): investigate qmlplugindump failure
Expand All @@ -23,7 +24,8 @@ mkDerivation {
epoxy libICE libSM libinput libxkbcommon udev wayland xcb-util-cursor
xwayland

qtdeclarative qtmultimedia qtscript qtx11extras qtsensors
qtdeclarative qtmultimedia qtquickcontrols2 qtscript qtsensors
qtvirtualkeyboard qtx11extras

breeze-qt5 kactivities kcmutils kcompletion kconfig kconfigwidgets
kcoreaddons kcrash kdeclarative kdecoration kglobalaccel ki18n kiconthemes
Expand Down
4 changes: 2 additions & 2 deletions pkgs/desktops/plasma-5/plasma-desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
kdeclarative, kded, kdelibs4support, kemoticons, kglobalaccel, ki18n,
kitemmodels, knewstuff, knotifications, knotifyconfig, kpeople, krunner,
kscreenlocker, ksysguard, kwallet, kwin, phonon, plasma-framework,
plasma-workspace, xf86inputlibinput
plasma-workspace, qqc2-desktop-style, xf86inputlibinput
}:

mkDerivation {
Expand All @@ -27,7 +27,7 @@ mkDerivation {
attica baloo kactivities kactivities-stats kauth kcmutils kdbusaddons
kdeclarative kded kdelibs4support kemoticons kglobalaccel ki18n kitemmodels
knewstuff knotifications knotifyconfig kpeople krunner kscreenlocker
ksysguard kwallet kwin plasma-framework plasma-workspace
ksysguard kwallet kwin plasma-framework plasma-workspace qqc2-desktop-style
];

patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
Expand Down
2 changes: 1 addition & 1 deletion pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp

void ClockHelper::toHwclock()
{
- QString hwclock = KStandardDirs::findExe(QStringLiteral("hwclock"), exePath);
- QString hwclock = QStandardPaths::findExecutable(QStringLiteral("hwclock"), exePath.split(QLatin1Char(':')));
+ QString hwclock = QLatin1String(NIXPKGS_HWCLOCK);
if (!hwclock.isEmpty()) {
KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc"));
Expand Down
13 changes: 9 additions & 4 deletions pkgs/desktops/plasma-5/plasma-pa.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{
mkDerivation,
extra-cmake-modules, kdoctools,
gconf, glib, kconfigwidgets, kcoreaddons, kdeclarative, kglobalaccel, ki18n,
libcanberra-gtk3, libpulseaudio, plasma-framework, qtdeclarative, kwindowsystem
kconfigwidgets, kcoreaddons, kdeclarative, kglobalaccel, ki18n, kwindowsystem, plasma-framework,
qtdeclarative,
gconf, glib, libcanberra-gtk3, libpulseaudio, sound-theme-freedesktop
}:

mkDerivation {
name = "plasma-pa";
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
gconf glib kconfigwidgets kcoreaddons kdeclarative kglobalaccel ki18n
libcanberra-gtk3 libpulseaudio plasma-framework qtdeclarative kwindowsystem
gconf glib libcanberra-gtk3 libpulseaudio sound-theme-freedesktop

kconfigwidgets kcoreaddons kdeclarative kglobalaccel ki18n plasma-framework
kwindowsystem

qtdeclarative
];
}
Loading