Subject: [PATCH] gnu: Add konsave.

From: Sergio Pastor Pérez <[email-masked]>
Date: Thu, 8 May 2025 18:46:03 +0200

* gnu/packages/kde-utils.scm (konsave): New variable.

Change-Id: I975e17f9fa17db0fa22e93798ed5ff2f4011a305
---
 gnu/packages/kde-utils.scm | 42 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/kde-utils.scm b/gnu/packages/kde-utils.scm
index 994597571c..79d81d9ee3 100644
--- a/gnu/packages/kde-utils.scm
+++ b/gnu/packages/kde-utils.scm
@@ -21,6 +21,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages kde-utils)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system qt)
   #:use-module (guix gexp)
   #:use-module (guix download)
@@ -31,6 +32,7 @@ (define-module (gnu packages kde-utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
@@ -52,6 +54,9 @@ (define-module (gnu packages kde-utils)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages kde-plasma)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages samba)
   #:use-module (gnu packages xdisorg)
@@ -747,6 +752,43 @@ (define-public kirogi
       (license ;GPL for programs, LGPL for libraries
        (list license:gpl2+ license:lgpl2.0)))))
 
+(define-public konsave
+  (package
+    (name "konsave")
+    (version "2.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Prayag2/konsave")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1j5nszy41j4fd6b5w7188gphfk2s0dj44rs7fg55a4izvm0brbx9"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-pyyaml))
+    (native-inputs (list python-aiohttp
+                         python-aiohttp-cors
+                         python-black
+                         python-pylint
+                         python-setuptools
+                         python-wheel))
+    (arguments
+     '(#:tests? #false ; no tests.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'sanity-check 'set-home-directory
+           ;; sanity-check requires a home directory since importing the
+           ;; `const.py' module creates a directory to save configurations.
+           (lambda _ (setenv "HOME" "/tmp") #t)))))
+    (home-page "https://www.github.com/prayag2/konsave")
+    (synopsis "Linux customization saver")
+    (description
+     "Konsave is command line program written in Python to let you backup your
+dotfiles and switch to other ones in an instant.  It officially supports KDE
+Plasma.")
+    (license license:gpl3)))
+
 (define-public kontrast
   (package
     (name "kontrast")
-- 
2.49.0