[bug#78406] gnu: Add secretsd.

Message ID 8cc6bd5057dcd8ba6723ab7ff4a36293299a17f9.1747145787.git.sarg@sarg.org.ru
State New
Headers
Series [bug#78406] gnu: Add secretsd. |

Commit Message

Sergey Trofimov May 13, 2025, 2:16 p.m. UTC
  * gnu/packages/password-utils.scm (secretsd): New variable.

Change-Id: I9beb6b86ec4dae784146e7ce91210a85cf07ec7c
---
 gnu/packages/password-utils.scm | 44 +++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)


base-commit: 364694773ef1c61d4c9ec73e24f73642786486ca
  

Patch

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 548629c965..6e6403a898 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -1274,6 +1274,50 @@  (define-public argon2
     ;; files are CC0 only; see README.md and LICENSE for details.
     (license (list license:cc0 license:asl2.0))))
 
+(define-public secretsd
+  (let ((commit "4ea56226b8f7c8739eea7fc8d1ffca8e18cf58c9")
+        (revision "0"))
+    (package
+      (name "secretsd")
+      (version (git-version "1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/grawity/secretsd")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0ka21vmvm25kal3sa8zmrifh4zac878hk24y7y3jj3ig8dkv0vfy"))))
+      (build-system python-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'remove-deps-install
+             (lambda _
+               (substitute* "setup.py"
+                 ((".*install_requires.*")
+                  ""))))
+           (add-after 'install 'wrap-program
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/secretsd")
+                   `("GI_TYPELIB_PATH" ":" prefix
+                     (,(getenv "GI_TYPELIB_PATH"))))))))))
+      (inputs (list python-dbus python-platformdirs python-cryptography
+                    python-xdg python-pygobject))
+      (native-inputs (list bash-minimal python-setuptools python-wheel))
+      (home-page "https://github.com/grawity/secretsd")
+      (synopsis "Basic FreeDesktop.org Secret Service backend")
+      (description
+       "@code{secretsd} is a generic backend for the @code{libsecret} @acronym{API,
+application programming interface} to use on headless systems or minimal desktop
+environments.  It stores secrets in a @code{sqlite} database, encrypted using a
+@acronym{AES, Advanced Encryption Standard} key.  The database key is stored in a
+regular file next to the database by default, but can be read from an external
+program.")
+      (license license:expat))))
+
 (define-public pass-git-helper
   (package
     (name "pass-git-helper")