[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/45: gnu: Add plasma-workspace.
From: |
guix-commits |
Subject: |
07/45: gnu: Add plasma-workspace. |
Date: |
Sun, 31 Jan 2021 10:27:20 -0500 (EST) |
htgoebel pushed a commit to branch wip-kde-plasma
in repository guix.
commit f6696fa9d5f1511dcaa339a38ad63f5654b50ba3
Author: Hartmut Goebel <h.goebel@crazy-compilers.com>
AuthorDate: Fri Jun 9 14:04:51 2017 +0200
gnu: Add plasma-workspace.
* gnu/packages/kde-plasma.scm (plasma-workspace): New variable.
* gnu/packages/patches/plasma-workspace-startkde.patch: New file.
---
gnu/packages/kde-plasma.scm | 163 +++++++++++++++++++++
.../patches/plasma-workspace-startkde.patch | 106 ++++++++++++++
2 files changed, 269 insertions(+)
diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm
index afdc980..11b0b68 100644
--- a/gnu/packages/kde-plasma.scm
+++ b/gnu/packages/kde-plasma.scm
@@ -22,18 +22,28 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages kde-plasma)
+ #:use-module (ice-9 textual-ports)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system cmake)
#:use-module (guix build-system qt)
+ #:use-module (gnu packages)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages iso-codes)
+ #:use-module (gnu packages networking)
+ #:use-module (gnu packages password-utils)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
#:use-module (gnu packages web)
@@ -587,3 +597,156 @@ with a ksysguardd daemon, which may also run on a remote
system.")
(description "This project should be installing only the xml files of the
non-standard wayland protocols we use in Plasma..")
(license license:gpl2+)))
+
+(define-public plasma-workspace
+ (package
+ (name "plasma-workspace")
+ (version "5.19.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://kde/stable/plasma/" version
+ "/plasma-workspace-" version ".tar.xz"))
+ (sha256
+ (base32 "09w1rrkppqnjcnw0hczmmhfzavmph2zk54bad7fnw0b3ivh2j0s9"))
+ (patches (search-patches "plasma-workspace-startkde.patch"))))
+ (build-system qt-build-system)
+ (arguments
+ `(;;#:configure-flags '("-Wno-dev") ;; too many dev-warnings, silence them
+ #:modules ((ice-9 textual-ports)
+ ,@%qt-build-system-modules)
+ #:phases
+ (modify-phases (@ (guix build qt-build-system) %standard-phases)
+ (add-after 'unpack 'patch-qml-import-path
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; NIX: absolute-wallpaper-install-dir.patch
+ (substitute* "sddm-theme/theme.conf.cmake"
+ (("\\$\\{CMAKE_INSTALL_PREFIX}/\\$\\{WALLPAPER_INSTALL_DIR}")
+ (string-append (assoc-ref outputs "breeze")
+ "/share/wallpapers")))
+ #t))
+ (add-before 'configure 'add-definitions
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (dbus (assoc-ref inputs "dbus"))
+ (kinit (assoc-ref inputs "kinit"))
+ (xmessage (assoc-ref inputs "xmessage"))
+ (xprop (assoc-ref inputs "xprop"))
+ (xrdb (assoc-ref inputs "xrdb"))
+ (xsetroot (assoc-ref inputs "xsetroot")))
+ (with-output-to-file "CMakeLists.txt.new"
+ (lambda _
+ (display
+ (string-append
+ "add_compile_definitions(\n"
+ "NIXPKGS_XMESSAGE=\"" xmessage "/bin/xmessage\"\n"
+ "NIXPKGS_XRDB=\"" xrdb "/bin/xrdb\"\n"
+ "NIXPKGS_XSETROOT=\"" xsetroot "/bin/xsetroot\"\n"
+ "NIXPKGS_XPROP=\"" xprop "/bin/xprop\"\n"
+ "NIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT=\""
+ dbus "/bin/dbus-update-activation-environment\"\n"
+ ;;"NIXPKGS_START_KDEINIT_WRAPPER=\""
+ ;;kinit "/lib/libexec/kf5/start_kdeinit_wrapper\"\n" ;;
FIXME: should be in /libexec
+ "NIXPKGS_KDEINIT5_SHUTDOWN=\""
+ kinit "/bin/kdeinit5_shutdown\"\n"
+ ")\n\n"))
+ (display
+ (call-with-input-file "CMakeLists.txt"
+ get-string-all))))
+ (rename-file "CMakeLists.txt.new" "CMakeLists.txt"))
+ #t))
+ (replace 'check
+ ;; TODO: Make this test pass. check-after-install, setting
+ ;; QT_PLUGIN_PATH, starting a X11-server did not suffice to make
+ ;; testdesktop pass.
+ ;; launchertasksmodeltest fails since it relies on .desktop-files
+ ;; from installed dolphin and konquerer, see
+ ;; <https://bugs.kde.org/386458>
+ (lambda _
+ (invoke "ctest" "." "-E" "testdesktop|launchertasksmodeltest")))
+ (add-before 'check 'check-setup
+ (lambda _
+ (setenv "HOME" (getcwd))
+ #t))
+ )))
+ (native-inputs
+ `(("extra-cmake-modules" ,extra-cmake-modules)
+ ("pkg-config" ,pkg-config)
+ ("kdoctools" ,kdoctools)))
+ (propagated-inputs
+ `(("iso-codes" ,iso-codes))); run-time dependency
+ ;; TODO: Warning at /gnu/store/…-kpackage-5.34.0/…/KF5PackageMacros.cmake:
+ ;; warnings during generation of metainfo for org.kde.breeze.desktop:
+ ;; Package type "Plasma/LookAndFeel" not found
+ ;; TODO: Warning at /gnu/store/…-kpackage-5.37.0/…/KF5PackageMacros.cmake:
+ ;; warnings during generation of metainfo for org.kde.image:
+ ;; Package type "Plasma/Wallpaper" not found
+ ;; TODO: Still some unknown property types, e.g for key "X-KDE-ParentApp",
+ ;; "X-Plasma-RemoteLocation", "X-Plasma-EngineName",
+ ;; "X-Plasma-MainScript".
+ (inputs
+ `(;; TODO: Optional: AppStreamQt, Qalculate, libgps
+ ("baloo" ,baloo)
+ ("breeze" ,breeze)
+ ("dbus" ,dbus) ;; run-time dependency
+ ("kactivities" ,kactivities)
+ ("kactivities-stats" ,kactivities-stats)
+ ("kcmutils" ,kcmutils) ; nicht in NIX
+ ("kcrash" ,kcrash)
+ ("kdbusaddons" ,kdbusaddons)
+ ("kdeclarative" ,kdeclarative)
+ ("kded" ,kded) ;
+ ("kdelibs4support" ,kdelibs4support)
+ ("kdesu" ,kdesu)
+ ("kglobalaccel" ,kglobalaccel)
+ ("kholidays" ,kholidays) ;; optional, for Plasma Calendar plugin
+ ("ki18n" ,ki18n)
+ ("kidletime" ,kidletime)
+ ("kinit" ,kinit) ;; required by startkde, not listed as a requirement
+ ("kjs" ,kjs)
+ ("kjsembed" ,kjsembed)
+ ("knewstuff" ,knewstuff)
+ ("knotifyconfig" ,knotifyconfig)
+ ("kpackage" ,kpackage)
+ ("kpeople" ,kpeople)
+ ("krunner" ,krunner)
+ ("kscreenlocker" ,kscreenlocker)
+ ("kirigami" ,kirigami) ;; run-time dependency FIXME: needs patching?
+ ("ksysguard" ,ksysguard)
+ ("ktexteditor" ,ktexteditor)
+ ("ktextwidgets" ,ktextwidgets)
+ ("kuserfeedback" ,kuserfeedback) ; telemetry :-(
+ ("kwallet" ,kwallet)
+ ("kwayland" ,kwayland)
+ ("kwin" ,kwin)
+ ("kxmlrpcclient" ,kxmlrpcclient)
+ ("libkscreen" ,libkscreen)
+ ("libksysguard" ,libksysguard)
+ ("libsm" ,libsm)
+ ("libxrender" ,libxrender)
+ ("libxtst" ,libxtst) ; not listed as a requirement
+ ("networkmanager-qt" ,networkmanager-qt)
+ ("phonon" ,phonon)
+ ("plasma-framework" ,plasma-framework)
+ ("prison" ,prison)
+ ("qtbase" ,qtbase)
+ ("qtdeclarative" ,qtdeclarative)
+ ("qtscript" ,qtscript)
+ ("qtx11extras" ,qtx11extras)
+ ("solid" ,solid)
+ ("xcb-util" ,xcb-util)
+ ("xcb-util-image" ,xcb-util-image)
+ ("xcb-util-keysyms" ,xcb-util-keysyms)
+ ("xrdb" ,xrdb) ;; run-time dependency
+ ("xmessage" ,xmessage) ;; run-time dependency
+ ("xprop" ,xprop) ;; run-time dependency
+ ("xsetroot" ,xsetroot) ;; run-time dependency
+ ("zlib" ,zlib)))
+ (home-page "https://invent.kde.org/plasma/plasma-workspace")
+ (synopsis "Plasma workspace components for KF5")
+ (description "Workspaces provide support for KDE Plasma Widgets,
+integrated search, hardware management and a high degree of customizability.")
+ ;; Parts of the code is Expat licensed, other parts GPL-3+ and even other
+ ;; parts are LGPL2.1+. The artwork is under some different licenses.
+ (license (list license:expat license:lgpl3+ ;; KDE e.V.
+ license:gpl2 license:lgpl2.1 license:gpl2+))))
diff --git a/gnu/packages/patches/plasma-workspace-startkde.patch
b/gnu/packages/patches/plasma-workspace-startkde.patch
new file mode 100644
index 0000000..00a1653
--- /dev/null
+++ b/gnu/packages/patches/plasma-workspace-startkde.patch
@@ -0,0 +1,106 @@
+Adopted to v5.19.5 by Hartmut Goebel
+From 6477e377fcca39c07ef5f91a55084d7d74715d00 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Tue, 28 Jan 2020 05:00:53 -0600
+Subject: [PATCH 1/2] startkde
+
+---
+ startkde/startplasma-waylandsession.cpp | 2 +-
+ startkde/startplasma-x11.cpp | 2 +-
+ startkde/startplasma.cpp | 24 ++++++++++--------------
+ 3 files changed, 12 insertions(+), 16 deletions(-)
+
+diff --git a/startkde/startplasma-waylandsession.cpp
b/startkde/startplasma-waylandsession.cpp
+index 87c71c6b3..5fc53140e 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 3314b6283..14cbe29fa 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 4c9f5cef6..5ea4c2cf1 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)
+@@ -242,15 +242,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
+@@ -267,11 +267,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;
+ }
+
+@@ -287,7 +283,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();
+@@ -309,7 +305,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;
+--
+2.25.1
+
- 39/45: gnu: Add powerdevil., (continued)
- 39/45: gnu: Add powerdevil., guix-commits, 2021/01/31
- 01/45: TEMP HACK refresh to 5.19.5, guix-commits, 2021/01/31
- 21/45: gnu: Add kgamma5., guix-commits, 2021/01/31
- 25/45: gnu: Add milou., guix-commits, 2021/01/31
- 31/45: gnu: Add plasma-tests. REWORD, guix-commits, 2021/01/31
- 35/45: gnu: Add systemsettings., guix-commits, 2021/01/31
- 37/45: gnu: Add khotkeys., guix-commits, 2021/01/31
- 42/45: gnu: Add utempter -- TODO later, guix-commits, 2021/01/31
- 40/45: gnu: Add breeze-grub DUMMY. MUST come after plasma-desktop, guix-commits, 2021/01/31
- 43/45: TODO gnu: Add discover., guix-commits, 2021/01/31
- 07/45: gnu: Add plasma-workspace.,
guix-commits <=
- 15/45: TEMP Add some helpers for running plasma in the VM., guix-commits, 2021/01/31
- 11/45: TEMP Add some Readme-files for packaging Plasma for Guix., guix-commits, 2021/01/31
- 41/45: gnu: Add breeze-plymouth DUMMY., guix-commits, 2021/01/31
- 06/45: gnu: Add kwin. use a patch REWORD, guix-commits, 2021/01/31
- 34/45: gnu: Add sddm-kcm., guix-commits, 2021/01/31
- 45/45: TEMP Add "playgound" for runninc plasma on another virtual terminal., guix-commits, 2021/01/31
- 32/45: gnu: Add plasma-workspace-wallpapers., guix-commits, 2021/01/31