[bug#34435,3/3] gnu: Add kscreenlocker.

Message ID 20190211151835.18653-3-mbakke@fastmail.com
State Accepted
Headers show
Series KDE updates | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed

Commit Message

Marius Bakke Feb. 11, 2019, 3:18 p.m. UTC
From: Hartmut Goebel <h.goebel@crazy-compilers.com>

* gnu/packages/kde.scm (kscreenlocker): New public variable.

Co-authored-by: Marius Bakke <mbakke@fastmail.com>
---
 gnu/packages/kde.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

Comments

Hartmut Goebel Feb. 12, 2019, 8:45 a.m. UTC | #1
Am 11.02.19 um 16:18 schrieb Marius Bakke:
> +    (native-inputs
> +     `(("extra-cmake-modules" ,extra-cmake-modules)
> +       ("pkg-config" ,pkg-config)
> +

Empty line.


> +       ("logind" ,elogind)        ;optional loginctl support

According to my notes (for 5.13.5) this is a run-time dependency. Why do
we need to list it here and not later in some "service"?

Another thing: I suggest keeping al l Plasma related packages in a
module of it's own. This will help keeping modules small, easy to spot
and easier to maintain.

Otherwise LGTM
Marius Bakke Feb. 12, 2019, 11:02 p.m. UTC | #2
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

> Am 11.02.19 um 16:18 schrieb Marius Bakke:
>> +    (native-inputs
>> +     `(("extra-cmake-modules" ,extra-cmake-modules)
>> +       ("pkg-config" ,pkg-config)
>> +
>
> Empty line.

I like adding empty lines to "group" inputs, or as a separator to make
some things "stand out".

>> +       ("logind" ,elogind)        ;optional loginctl support
>
> According to my notes (for 5.13.5) this is a run-time dependency. Why do
> we need to list it here and not later in some "service"?

CMake tests for it, and sets HAVE_UNLOCK_CAPABILITY to TRUE when found.

I did not study the code enough to see how it is used so I left it in
for now.

> Another thing: I suggest keeping al l Plasma related packages in a
> module of it's own. This will help keeping modules small, easy to spot
> and easier to maintain.

I moved the Plasma packages to a kde-plasma module with commit
bec2a2e10e199d6ee671ec5713bd103242e91b62.  Thanks for the feedback!

Patch

diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index 3508e8461f..00a6631e8e 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -38,6 +38,7 @@ 
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages ebook)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
@@ -46,6 +47,7 @@ 
   #:use-module (gnu packages graphics)
   #:use-module (gnu packages image)
   #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages markup)
   #:use-module (gnu packages maths)
@@ -483,6 +485,70 @@  features include brush stabilizers, brush engines and wrap-around mode.")
 other special events for a geographical region.")
     (license license:lgpl2.0+)))
 
+(define-public kscreenlocker
+  (package
+    (name "kscreenlocker")
+    (version "5.14.5")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://kde/stable/plasma/" version
+                          "/kscreenlocker-" version ".tar.xz"))
+      (sha256
+       (base32 "16amr7pz0k6w5vkk1dwn2qi3s1mln0jypwmjazqq2lbwimn8k56m"))))
+    (properties `((tags . '("Desktop" "KDE" "Plasma"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (system (string-append (assoc-ref inputs "xorg-server")
+                                   "/bin/Xvfb :1 -screen 0 640x480x24 &"))
+             (setenv "DISPLAY" ":1")
+             #t))
+         (delete 'check)
+         ;; Tests use the installed binary and require a DBus session.
+         (add-after 'install 'check
+           (lambda _
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+             (invoke "dbus-launch" "ctest" "."))))))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)
+
+       ;; For tests.
+       ("dbus" ,dbus)
+       ("xorg-server" ,xorg-server)))
+    (inputs
+     `(("kcmutils" ,kcmutils)
+       ("kcrash" ,kcrash)
+       ("kdeclarative" ,kdeclarative)
+       ("kglobalaccel" ,kglobalaccel)
+       ("ki18n" ,ki18n)
+       ("kidletime" ,kidletime)
+       ("knotifications" ,knotifications)
+       ("ktextwidgets" ,ktextwidgets)
+       ("kwayland" ,kwayland)
+       ("kwindowsystem" ,kwindowsystem)
+       ("kxmlgui" ,kxmlgui)
+       ("libseccomp" ,libseccomp) ;for sandboxing the look'n'feel package
+       ("libxcursor" ,libxcursor) ;missing in CMakeList.txt
+       ("libxi" ,libxi)           ;XInput, required for grabbing XInput2 devices
+       ("linux-pam" ,linux-pam)
+       ("logind" ,elogind)        ;optional loginctl support
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtx11extras" ,qtx11extras)
+       ("solid" ,solid)
+       ("wayland" ,wayland)
+       ("xcb-util-keysyms" ,xcb-util-keysyms)))
+    (home-page "https://cgit.kde.org/kscreenlocker.git")
+    (synopsis "Screen locking library")
+    (description
+     "@code{kscreenlocker} is a library for creating secure lock screens.")
+    (license license:gpl2+)))
+
 (define-public libkomparediff2
   (package
     (name "libkomparediff2")