Subject: [bug#45306] [PATCH] gnu: Add ksshaskpass.

From: Z572 <[email-masked]>
Date: Fri, 18 Dec 2020 10:25:51 +0800

diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm
index e18d521ad2..883e4dcd5d 100644
--- a/gnu/packages/kde-plasma.scm
+++ b/gnu/packages/kde-plasma.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2019 Marius Bakke <[email-masked]>
 ;;; Copyright © 2017 Hartmut Goebel <[email-masked]>
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <[email-masked]>
+;;; Copyright © 2020 Zheng Junjie <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,6 +60,37 @@ These window decorations can be used by for example an X11 based window
 manager which re-parents a Client window to a window decoration frame.")
     (license license:lgpl3+)))
 
+(define-public ksshaskpass
+  (package
+    (name "ksshaskpass")
+    (version "5.19.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://kde/stable/plasma/" version
+                                  "/ksshaskpass-" version ".tar.xz"))
+
+              (sha256
+               (base32
+                "1k2va2v9051f71w78dn3gihk642iyy5yzrkcfnp97fag8g6dpisi"))))
+    (build-system qt-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("kdoctools" ,kdoctools)))
+    (inputs
+     `(("kcoreaddons" ,kcoreaddons)
+       ("ki18n" ,ki18n)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("qtbase" ,qtbase)))
+    (propagated-inputs
+     `(("kwallet" ,kwallet)))
+    (home-page "https://invent.kde.org/plasma/ksshaskpass")
+    (synopsis "Front-end for ssh-add using kwallet")
+    (description "Ksshaskpass is a front-end for ssh-add which stores the
+password of the ssh key in KWallet. Ksshaskpass is not meant to be executed
+directly, you need to tell ssh-add about it. ssh-add will then call it if it is
+not associated to a terminal.")
+    (license license:gpl2+)))
+
 (define-public kscreenlocker
   (package
     (name "kscreenlocker")
@@ -78,7 +110,7 @@ manager which re-parents a Client window to a window decoration frame.")
          (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 &"))
+                                    "/bin/Xvfb :1 -screen 0 640x480x24 &"))
              (setenv "DISPLAY" ":1")
              #t))
          (delete 'check)