Verified Commit 7e29c116 authored by Hartmut Goebel's avatar Hartmut Goebel
Browse files

gnu: Add kwin. use a patch REWORD

* gnu/packages/kde-plasma.scm(kwin): New variable.
* gnu/packages/patches/kwin-5.10.4-autotests-dependencies.patch: New file.
parent a01b9024
......@@ -23,7 +23,9 @@
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#: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)
......@@ -32,6 +34,7 @@
#:use-module (gnu packages networking)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg))
......@@ -587,3 +590,129 @@ NetBSD, OpenBSD, Solaris and Tru64 with varying degrees of completion.")
(description "Provides integration plugins for various KDE Frameworks for
Wayland")
(license license:lgpl3+))) ; KDE e.V.
(define-public kwin
(package
(name "kwin")
(version "5.13.5")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://kde/stable/plasma/" version
"/kwin-" version ".tar.xz"))
(sha256
(base32 "0ld1pclni1axrh7jww3gxlfwkbjsfbqb9z7gygj2ff3nmc6khgfm"))))
(properties `((tags . '("Desktop" "KDE" "Plasma"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #f ;; TODO 35/77 tests fail – even with the phases below
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch
(lambda* (#:key inputs #:allow-other-keys)
;; follow symlinks - taken from NIX
(substitute* "plugins/kdecorations/aurorae/src/aurorae.cpp"
(("^(\\s*QDirIterator it\\(path, QDirIterator::Subdirectories)(\\);)" _ a b)
(string-append a " | QDirIterator::FollowSymlinks " b)))
;; hard-code path to xwayland binary - taken from NIX
;; FIXME: This will install xorg-server-xwayland on all systems
;; using kwin :-(
(substitute* "main_wayland.cpp"
(("^(\\s*m_xwaylandProcess->setProgram\\(QStringLiteral\\(\")Xwayland(\"\\)\\);)" _ a b)
(string-append a (assoc-ref inputs "xorg-server-xwayland")
"/bin/Xwayland" b)))
#t))
(add-after 'install 'check
(assoc-ref %standard-phases 'check))
(add-before 'check 'check-setup
(lambda* (#:key outputs #:allow-other-keys)
(setenv "HOME" (getcwd))
(setenv "XDG_RUNTIME_DIR" "..")
(setenv "DBUS_FATAL_WARNINGS" "0")
(setenv "QT_PLUGIN_PATH"
(string-append (assoc-ref outputs "out") "/lib/qt5/plugins:"
(getenv "QT_PLUGIN_PATH")))
;; The test suite requires a running X server.
(system "Xvfb :98 -screen 0 640x480x24 &")
(setenv "DISPLAY" ":98")
#t))
(add-after 'install 'add-symlinks
;; Some package(s) refer to these service types by the wrong name.
;; I would prefer to patch those packages, but I cannot find them!
(lambda* (#:key outputs #:allow-other-keys)
(let ((kst5 (string-append (assoc-ref outputs "out")
"/share/kservicetypes5/")))
(symlink (string-append kst5 "kwineffect.desktop")
(string-append kst5 "kwin-effect.desktop"))
(symlink (string-append kst5 "kwinscript.desktop")
(string-append kst5 "kwin-script.desktop"))))))))
(native-inputs
`(("extra-cmake-modules" ,extra-cmake-modules)
("pkg-config" ,pkg-config)
("kdoctools" ,kdoctools)
("qttools" ,qttools)
;; the remaining ones are required native for running the tests
("dbus" ,dbus)
("kwayland-integration" ,kwayland-integration)
("kwindowsystem" ,kwindowsystem)
("qtwayland" ,qtwayland)
("xorg-server" ,xorg-server)
("xorg-server-xwayland" ,xorg-server-xwayland)))
(inputs
`(("breeze" ,breeze)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
("kactivities" ,kactivities)
("kcmutils" ,kcmutils)
("kcompletion" ,kcompletion)
("kconfig" ,kconfig)
("kconfigwidgets" ,kconfigwidgets)
("kcoreaddons" ,kcoreaddons)
("kcrash" ,kcrash)
("kdeclarative" ,kdeclarative)
("kdecoration" ,kdecoration)
("kglobalaccel" ,kglobalaccel)
("ki18n" ,ki18n)
("kiconthemes" ,kiconthemes)
("kidletime" ,kidletime)
("kinit" ,kinit)
("kio" ,kio)
("knewstuff" ,knewstuff)
("knotifications" ,knotifications)
("kpackage" ,kpackage)
("kscreenlocker" ,kscreenlocker)
("kservice" ,kservice)
("ktextwidgets" ,ktextwidgets)
("kwayland" ,kwayland)
("kwidgetsaddons" ,kwidgetsaddons)
("kxmlgui" ,kxmlgui)
("libdrm" ,libdrm)
("libepoxy" ,libepoxy)
("libice" ,libice) ;; missing in CMakeList.txt
("libinput" ,libinput)
("libsm" ,libsm) ;; missing in CMakeList.txt
("libxi" ,libxi)
("libxkbcommon" ,libxkbcommon)
("plasma-framework" ,plasma-framework)
("qtbase" ,qtbase)
("qtdeclarative" ,qtdeclarative)
("qtmultimedia" ,qtmultimedia)
("qtscript" ,qtscript)
("qtsensors" ,qtsensors)
("qtx11extras" ,qtx11extras)
("wayland" ,wayland)
("xcb-util-cursor" ,xcb-util-cursor)
("xcb-util-image" ,xcb-util-image)
("xcb-util-keysyms" ,xcb-util-keysyms)
;; TODO: optional feature: libhybris allows to run bionic-based HW
;; adaptations in glibc systems.
("xcb-util-wm" ,xcb-util-wm))) ; for icccm:, optional
(home-page "http://community.kde.org/KWin")
(synopsis "KDE Plasma 5 Window Manager")
(description " KWin is the default window manager for the KDE Plasma
Desktop. It gives you complete control over your windows, making sure they're
not in the way but aid you in your task. It paints the window decoration, the
bar on top of every window with (configurable) buttons like close, maximize
and minimize. It also handles placing of windows and switching between
them.")
(license license:gpl2+)))
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