mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
plasma-workspace: Update patches for 5.17.5
This commit is contained in:
parent
35f0c972fa
commit
84ddb3da35
3 changed files with 151 additions and 1054 deletions
129
pkgs/desktops/plasma-5/plasma-workspace/0001-startkde.patch
Normal file
129
pkgs/desktops/plasma-5/plasma-workspace/0001-startkde.patch
Normal file
|
@ -0,0 +1,129 @@
|
|||
From 1796822e4c97062b919a596ce13db68e2c46c7e8 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Tuegel <ttuegel@mailbox.org>
|
||||
Date: Tue, 28 Jan 2020 05:00:53 -0600
|
||||
Subject: [PATCH] startkde
|
||||
|
||||
---
|
||||
startkde/startplasma-waylandsession.cpp | 2 +-
|
||||
startkde/startplasma-x11.cpp | 2 +-
|
||||
startkde/startplasma.cpp | 32 ++++++++-----------------
|
||||
3 files changed, 12 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/startkde/startplasma-waylandsession.cpp b/startkde/startplasma-waylandsession.cpp
|
||||
index 87c71c6..5fc5314 100644
|
||||
--- a/startkde/startplasma-waylandsession.cpp
|
||||
+++ b/startkde/startplasma-waylandsession.cpp
|
||||
@@ -67,7 +67,7 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
waitForKonqi();
|
||||
out << "startplasma-waylandsession: Shutting down...\n";
|
||||
|
||||
- runSync(QStringLiteral("kdeinit5_shutdown"), {});
|
||||
+ runSync(QStringLiteral(NIXPKGS_KDEINIT5_SHUTDOWN), {});
|
||||
|
||||
cleanupX11();
|
||||
out << "startplasma-waylandsession: Done.\n";
|
||||
diff --git a/startkde/startplasma-x11.cpp b/startkde/startplasma-x11.cpp
|
||||
index 3314b62..14cbe29 100644
|
||||
--- a/startkde/startplasma-x11.cpp
|
||||
+++ b/startkde/startplasma-x11.cpp
|
||||
@@ -111,7 +111,7 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
|
||||
out << "startkde: Shutting down...\n";
|
||||
|
||||
- runSync(QStringLiteral("kdeinit5_shutdown"), {});
|
||||
+ runSync(QStringLiteral(NIXPKGS_KDEINIT5_SHUTDOWN), {});
|
||||
|
||||
cleanupPlasmaEnvironment();
|
||||
cleanupX11();
|
||||
diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp
|
||||
index e0f7004..8ac41fd 100644
|
||||
--- a/startkde/startplasma.cpp
|
||||
+++ b/startkde/startplasma.cpp
|
||||
@@ -34,7 +34,7 @@ QTextStream out(stderr);
|
||||
void messageBox(const QString &text)
|
||||
{
|
||||
out << text;
|
||||
- runSync(QStringLiteral("xmessage"), {QStringLiteral("-geometry"), QStringLiteral("500x100"), text});
|
||||
+ runSync(QStringLiteral(NIXPKGS_XMESSAGE), {QStringLiteral("-geometry"), QStringLiteral("500x100"), text});
|
||||
}
|
||||
|
||||
QStringList allServices(const QLatin1String& prefix)
|
||||
@@ -184,14 +184,6 @@ void runEnvironmentScripts()
|
||||
}
|
||||
}
|
||||
sourceFiles(scripts);
|
||||
-
|
||||
- // Make sure that the KDE prefix is first in XDG_DATA_DIRS and that it's set at all.
|
||||
- // The spec allows XDG_DATA_DIRS to be not set, but X session startup scripts tend
|
||||
- // to set it to a list of paths *not* including the KDE prefix if it's not /usr or
|
||||
- // /usr/local.
|
||||
- if (!qEnvironmentVariableIsSet("XDG_DATA_DIRS")) {
|
||||
- qputenv("XDG_DATA_DIRS", KDE_INSTALL_FULL_DATAROOTDIR ":/usr/share:/usr/local/share");
|
||||
- }
|
||||
}
|
||||
|
||||
|
||||
@@ -240,15 +232,15 @@ void setupX11()
|
||||
// If the user has overwritten fonts, the cursor font may be different now
|
||||
// so don't move this up.
|
||||
|
||||
- runSync(QStringLiteral("xsetroot"), {QStringLiteral("-cursor_name"), QStringLiteral("left_ptr")});
|
||||
- runSync(QStringLiteral("xprop"), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("8t"), QStringLiteral("-set"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("true")});
|
||||
- runSync(QStringLiteral("xprop"), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("32c"), QStringLiteral("-set"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("5")});
|
||||
+ runSync(QStringLiteral(NIXPKGS_XSETROOT), {QStringLiteral("-cursor_name"), QStringLiteral("left_ptr")});
|
||||
+ runSync(QStringLiteral(NIXPKGS_XPROP), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("8t"), QStringLiteral("-set"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("true")});
|
||||
+ runSync(QStringLiteral(NIXPKGS_XPROP), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("32c"), QStringLiteral("-set"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("5")});
|
||||
}
|
||||
|
||||
void cleanupX11()
|
||||
{
|
||||
- runSync(QStringLiteral("xprop"), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_FULL_SESSION") });
|
||||
- runSync(QStringLiteral("xprop"), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_SESSION_VERSION") });
|
||||
+ runSync(QStringLiteral(NIXPKGS_XPROP), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_FULL_SESSION") });
|
||||
+ runSync(QStringLiteral(NIXPKGS_XPROP), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_SESSION_VERSION") });
|
||||
}
|
||||
|
||||
// TODO: Check if Necessary
|
||||
@@ -265,11 +257,7 @@ bool syncDBusEnvironment()
|
||||
{
|
||||
int exitCode;
|
||||
// At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
|
||||
- if (!QStandardPaths::findExecutable(QStringLiteral("dbus-update-activation-environment")).isEmpty()) {
|
||||
- exitCode = runSync(QStringLiteral("dbus-update-activation-environment"), { QStringLiteral("--systemd"), QStringLiteral("--all") });
|
||||
- } else {
|
||||
- exitCode = runSync(QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR "/ksyncdbusenv"), {});
|
||||
- }
|
||||
+ exitCode = runSync(QStringLiteral(NIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT), { QStringLiteral("--systemd"), QStringLiteral("--all") });
|
||||
return exitCode == 0;
|
||||
}
|
||||
|
||||
@@ -285,7 +273,7 @@ void setupFontDpi()
|
||||
//TODO port to c++?
|
||||
const QByteArray input = "Xft.dpi: " + QByteArray::number(fontsCfg.readEntry("forceFontDPI", 0));
|
||||
QProcess p;
|
||||
- p.start(QStringLiteral("xrdb"), { QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp") });
|
||||
+ p.start(QStringLiteral(NIXPKGS_XRDB), { QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp") });
|
||||
p.setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
p.write(input);
|
||||
p.closeWriteChannel();
|
||||
@@ -307,7 +295,7 @@ QProcess* setupKSplash()
|
||||
KConfigGroup ksplashCfg = cfg.group("KSplash");
|
||||
if (ksplashCfg.readEntry("Engine", QStringLiteral("KSplashQML")) == QLatin1String("KSplashQML")) {
|
||||
p = new QProcess;
|
||||
- p->start(QStringLiteral("ksplashqml"), { ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")) });
|
||||
+ p->start(QStringLiteral(CMAKE_INSTALL_FULL_BINDIR "/ksplashqml"), { ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")) });
|
||||
}
|
||||
}
|
||||
return p;
|
||||
@@ -329,7 +317,7 @@ bool startKDEInit()
|
||||
{
|
||||
// We set LD_BIND_NOW to increase the efficiency of kdeinit.
|
||||
// kdeinit unsets this variable before loading applications.
|
||||
- const int exitCode = runSync(QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit_wrapper"), { QStringLiteral("--kded"), QStringLiteral("+kcminit_startup") }, { QStringLiteral("LD_BIND_NOW=true") });
|
||||
+ const int exitCode = runSync(QStringLiteral(NIXPKGS_START_KDEINIT_WRAPPER), { QStringLiteral("--kded"), QStringLiteral("+kcminit_startup") }, { QStringLiteral("LD_BIND_NOW=true") });
|
||||
if (exitCode != 0) {
|
||||
messageBox(QStringLiteral("startkde: Could not start kdeinit5. Check your installation."));
|
||||
return false;
|
||||
--
|
||||
2.23.1
|
||||
|
|
@ -6,12 +6,12 @@
|
|||
coreutils, dbus, gnugrep, gnused, isocodes, libdbusmenu, libSM, libXcursor,
|
||||
libXtst, pam, wayland, xmessage, xprop, xrdb, xsetroot,
|
||||
|
||||
baloo, kactivities, kcmutils, kconfig, kcrash, kdbusaddons, kdeclarative,
|
||||
kdelibs4support, kdesu, kglobalaccel, kidletime, kinit, kjsembed, knewstuff,
|
||||
knotifyconfig, kpackage, krunner, kscreenlocker, ktexteditor, ktextwidgets,
|
||||
kwallet, kwayland, kwin, kxmlrpcclient, libkscreen, libksysguard, libqalculate,
|
||||
networkmanager-qt, phonon, plasma-framework, prison, solid, kholidays,
|
||||
breeze-qt5,
|
||||
baloo, kactivities, kactivities-stats, kcmutils, kconfig, kcrash, kdbusaddons,
|
||||
kdeclarative, kdelibs4support, kdesu, kglobalaccel, kidletime, kinit,
|
||||
kjsembed, knewstuff, knotifyconfig, kpackage, kpeople, krunner, kscreenlocker,
|
||||
ktexteditor, ktextwidgets, kwallet, kwayland, kwin, kxmlrpcclient, libkscreen,
|
||||
libksysguard, libqalculate, networkmanager-qt, phonon, plasma-framework,
|
||||
prison, solid, kholidays, breeze-qt5,
|
||||
|
||||
qtgraphicaleffects, qtquickcontrols, qtquickcontrols2, qtscript, qttools,
|
||||
qtwayland, qtx11extras,
|
||||
|
@ -26,53 +26,29 @@ mkDerivation {
|
|||
buildInputs = [
|
||||
isocodes libdbusmenu libSM libXcursor libXtst pam wayland
|
||||
|
||||
baloo kactivities kcmutils kconfig kcrash kdbusaddons kdeclarative
|
||||
kdelibs4support kdesu kglobalaccel kidletime kjsembed knewstuff
|
||||
knotifyconfig kpackage krunner kscreenlocker ktexteditor ktextwidgets
|
||||
kwallet kwayland kwin kxmlrpcclient libkscreen libksysguard libqalculate
|
||||
networkmanager-qt phonon plasma-framework prison solid kholidays
|
||||
baloo kactivities kactivities-stats kcmutils kconfig kcrash kdbusaddons
|
||||
kdeclarative kdelibs4support kdesu kglobalaccel kidletime kjsembed knewstuff
|
||||
knotifyconfig kpackage kpeople krunner kscreenlocker ktexteditor
|
||||
ktextwidgets kwallet kwayland kwin kxmlrpcclient libkscreen libksysguard
|
||||
libqalculate networkmanager-qt phonon plasma-framework prison solid
|
||||
kholidays
|
||||
|
||||
qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript qtwayland qtx11extras
|
||||
];
|
||||
propagatedUserEnvPkgs = [ qtgraphicaleffects ];
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DNIXPKGS_XMESSAGE=${getBin xmessage}/bin/xmessage"
|
||||
"-DNIXPKGS_MKDIR=${getBin coreutils}/bin/mkdir"
|
||||
"-DNIXPKGS_XRDB=${getBin xrdb}/bin/xrdb"
|
||||
"-DNIXPKGS_QTPATHS=${getBin qttools}/bin/qtpaths"
|
||||
"-DNIXPKGS_XSETROOT=${getBin xsetroot}/bin/xsetroot"
|
||||
"-DNIXPKGS_XPROP=${getBin xprop}/bin/xprop"
|
||||
"-DNIXPKGS_ID=${getBin coreutils}/bin/id"
|
||||
"-DNIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT=${getBin dbus}/bin/dbus-update-activation-environment"
|
||||
"-DNIXPKGS_START_KDEINIT_WRAPPER=${getLib kinit}/libexec/kf5/start_kdeinit_wrapper"
|
||||
"-DNIXPKGS_QDBUS=${getBin qttools}/bin/qdbus"
|
||||
"-DNIXPKGS_KWRAPPER5=${getBin kinit}/bin/kwrapper5"
|
||||
"-DNIXPKGS_KREADCONFIG5=${getBin kconfig}/bin/kreadconfig5"
|
||||
"-DNIXPKGS_GREP=${getBin gnugrep}/bin/grep"
|
||||
"-DNIXPKGS_KDEINIT5_SHUTDOWN=${getBin kinit}/bin/kdeinit5_shutdown"
|
||||
"-DNIXPKGS_SED=${getBin gnused}/bin/sed"
|
||||
"-DNIXPKGS_WALLPAPER_INSTALL_DIR=${getBin breeze-qt5}/share/wallpapers/"
|
||||
];
|
||||
|
||||
# To regenerate ./plasma-workspace.patch,
|
||||
#
|
||||
# > git clone https://github.com/ttuegel/plasma-workspace
|
||||
# > cd plasma-workspace
|
||||
# > git checkout nixpkgs/$x.$y # where $x.$y.$z == $version
|
||||
# ... make some commits ...
|
||||
# > git diff v$x.$y.$z
|
||||
#
|
||||
# Add upstream patches to the list below. For new patchs, particularly if not
|
||||
# submitted upstream, please make a pull request and add it to
|
||||
# ./plasma-workspace.patch.
|
||||
patches = [
|
||||
./plasma-workspace.patch
|
||||
./0001-startkde.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_KDOSTARTUPCONFIG5=\"''${!outputBin}/bin/kdostartupconfig5\""
|
||||
cmakeFlags+=" -DNIXPKGS_STARTPLASMA=''${!outputBin}/libexec/startplasma"
|
||||
'';
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
''-DNIXPKGS_XMESSAGE="${getBin xmessage}/bin/xmessage"''
|
||||
''-DNIXPKGS_XRDB="${getBin xrdb}/bin/xrdb"''
|
||||
''-DNIXPKGS_XSETROOT="${getBin xsetroot}/bin/xsetroot"''
|
||||
''-DNIXPKGS_XPROP="${getBin xprop}/bin/xprop"''
|
||||
''-DNIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT="${getBin dbus}/bin/dbus-update-activation-environment"''
|
||||
''-DNIXPKGS_START_KDEINIT_WRAPPER="${getLib kinit}/libexec/kf5/start_kdeinit_wrapper"''
|
||||
''-DNIXPKGS_KDEINIT5_SHUTDOWN="${getBin kinit}/bin/kdeinit5_shutdown"''
|
||||
];
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue