Verified Commit cd7cd30b authored by Hartmut Goebel's avatar Hartmut Goebel
Browse files

gnu: Add plasma-workspace.

* gnu/packages/kde-plasma.scm(plasma-workspace): New variable.
parent cc497bf4
......@@ -23,15 +23,18 @@
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#: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 kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages libcanberra)
#: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)
......@@ -1161,6 +1164,146 @@ it as part of their Plasma builds.")
;; GPL2+, I assume that here, too.
(license license:gpl2+)))
(define-public plasma-workspace
(package
(name "plasma-workspace")
(version "5.13.5")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://kde/stable/plasma/" version
"/plasma-workspace-" version ".tar.xz"))
(sha256
(base32 "1qcmw60lyp966rhvw9raaqrvxdv09pr8zc7x3fx1vpm9kphh3lv3"))))
(properties `((tags . '("Desktop" "KDE" "Plasma"))))
(build-system cmake-build-system)
(arguments
'(#:configure-flags '("-Wno-dev") ;; too many dev-warnings, silence them
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-qml-import-path
(lambda* (#:key outputs #:allow-other-keys)
(substitute*
'("applets/batterymonitor/package/contents/ui/BatteryItem.qml"
"applets/batterymonitor/package/contents/ui/PopupDialog.qml"
"applets/batterymonitor/package/contents/ui/batterymonitor.qml"
"applets/batterymonitor/package/contents/ui/CompactRepresentation.qml"
"applets/analog-clock/contents/ui/analogclock.qml"
"applets/lock_logout/contents/ui/lockout.qml"
"applets/notifications/package/contents/ui/main.qml")
(("^import \"(logic|data|uiproperties).js\" as " line mod)
(string-append "import \"../code/" mod ".js\" as ")))
(substitute* "startkde/kstartupconfig/kstartupconfig.cpp"
(("kdostartupconfig5") ;; TODO: Is this a good pattern?
(string-append (assoc-ref outputs "out")
"/bin/kdostartupconfig5")))
#t))
(add-after 'unpack 'patch-exec-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute*
'("startkde/startkde.cmake"
"startkde/startplasma.cmake")
(("@CMAKE_INSTALL_FULL_LIBEXECDIR_KF5@/start_kdeinit_wrapper")
(string-append (assoc-ref inputs "kinit")
"/lib/libexec/kf5/start_kdeinit_wrapper")))
#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/show_bug.cgi?id=386458>
(lambda _
(invoke "ctest" "." "-E" "testdesktop|launchertasksmodeltest")))
(add-before 'check 'check-setup
(lambda _
;; make Qt render "offscreen", required for tests
(setenv "QT_QPA_PLATFORM" "offscreen")
(setenv "HOME" (getcwd))
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
#t))
;; TODO: Nix removes this files, should we also do this?
;; (add-after 'install 'remove-startup-files
;; (lambda* (#:key outputs #:allow-other-keys)
;; (let ((out (assoc-ref outputs "out")))
;; (delete-file (string-append out "/bin/startkde"))
;; (delete-file (string-append out "/bin/startplasmacompositor"))
;; (delete-file (string-append out "/lib/libexec/startplasma"))
;; (delete-file-recursively
;; (string-append out "/share/wayland-sessions")))))
)))
(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)
("kactivities" ,kactivities)
("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)
("krunner" ,krunner)
("kscreenlocker" ,kscreenlocker)
("ksysguard" ,ksysguard)
("ktexteditor" ,ktexteditor)
("ktextwidgets" ,ktextwidgets)
("kwallet" ,kwallet)
("kwayland" ,kwayland)
("kwin" ,kwin)
("kxmlrpcclient" ,kxmlrpcclient)
("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)
("zlib" ,zlib)))
(home-page "https://cgit.kde.org/plasma-tests.git")
(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+))))
(define-public plasma-workspace-wallpapers
(package
(name "plasma-workspace-wallpapers")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment