diff mbox series

[bug#44492,v2,43/52] gnu: Add rust-secret-service-1.

Message ID 20210301091117.26777-4-leo.prikler@student.tugraz.at
State Not Applicable
Headers show
Series None | expand

Commit Message

Leo Prikler March 1, 2021, 9:11 a.m. UTC
* gnu/packages/crates-gtk.scm (rust-secret-service-1): New variable.
---
 gnu/packages/crates-gtk.scm | 45 +++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/crates-gtk.scm b/gnu/packages/crates-gtk.scm
index 72140279f1..dba3fb8cfd 100644
--- a/gnu/packages/crates-gtk.scm
+++ b/gnu/packages/crates-gtk.scm
@@ -2104,3 +2104,48 @@  renders username initials.")
         ("rust-tempfile" ,rust-tempfile-3))))
     (inputs
      `(("gtk+" ,gtk+)))))
+
+(define-public rust-secret-service-1
+  (package
+    (name "rust-secret-service")
+    (version "1.1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "secret-service" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "12hxz35i7sw5xsdldz1c6776fmz98z4dwh5779jis98w61020xbd"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f ; XXX: see rust-dbus
+       #:cargo-inputs
+       (("rust-aes" ,rust-aes-0.6)
+        ("rust-block-modes" ,rust-block-modes-0.7)
+        ("rust-dbus" ,rust-dbus-0.2)
+        ("rust-hkdf" ,rust-hkdf-0.10)
+        ("rust-lazy-static" ,rust-lazy-static-1)
+        ("rust-num" ,rust-num-0.3)
+        ("rust-rand" ,rust-rand-0.7)
+        ("rust-sha2" ,rust-sha2-0.9))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Tests require a running X server.
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")
+             ;; For the missing /etc/machine-id.
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             #t)))))
+    (native-inputs
+     `(("xorg-server" ,xorg-server-for-tests)))
+    (inputs
+     `(("dbus" ,dbus)))
+    (home-page "https://github.com/hwchen/secret-service-rs.git")
+    (synopsis "Secret Service interface")
+    (description "This package provides a Rust library to interface with
+the Secret Service API")
+    (license (list license:expat license:asl2.0))))