guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/05: gnu: trezor-agent: Update to 0.11.0.


From: guix-commits
Subject: 04/05: gnu: trezor-agent: Update to 0.11.0.
Date: Sun, 28 Nov 2021 15:32:00 -0500 (EST)

ngz pushed a commit to branch master
in repository guix.

commit d3448fafea40b6c53de34696d7e481811de36c09
Author: Attila Lendvai <attila@lendvai.name>
AuthorDate: Sun Nov 28 21:23:24 2021 +0100

    gnu: trezor-agent: Update to 0.11.0.
    
    * gnu/packages/finance.scm (trezor-agent): Update to 0.11.0.
    [source]: Use GitHub repository.
    [native-inputs]: Remove python-hidapi.  Add python-attrs.
    
    Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
 gnu/packages/finance.scm | 40 ++++++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 08639e2..2492f04 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1102,16 +1102,40 @@ the KeepKey Hardware Wallet.")
 (define-public trezor-agent
   (package
     (name "trezor-agent")
-    (version "0.10.0")
+    (version "0.11.0")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "trezor_agent" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/romanz/trezor-agent";)
+             ;; The version mismatch is not a mistake. Multiple python
+             ;; apps/packages are in the same git repo, and they have
+             ;; different versions. The git tag seems to track libagent,
+             ;; i.e. python-trezor-agent in the Guix namespace.
+             ;; See e.g. ./agents/trezor/setup.py
+             (commit "v0.14.2")))
        (sha256
-        (base32
-         "144657c7bn0a667dq5fv5r6j7iilxf3h9agj29v1m2qpq40g0az8"))))
+        (base32 "0nl44ldfw9s2v3p7g5bldfw3ds2hz9r28j42bpnp8bj0v5na3ivk"))
+       (modules
+        '((guix build utils)
+          (ice-9 ftw)
+          (srfi srfi-1)
+          (srfi srfi-26)))
+       (snippet
+        '(begin
+           ;; Delete everything except ./agents/trezor/
+           (for-each delete-file-recursively
+                     (filter (lambda (full-name)
+                               (not (string-prefix? "./agents/trezor/" 
full-name)))
+                             (find-files ".")))
+           ;; Move ./agents/trezor/* to the toplevel
+           (for-each (lambda (file-name)
+                       (rename-file (string-append "./agents/trezor/" 
file-name)
+                                    (string-append "./" file-name)))
+                     (scandir "./agents/trezor/"
+                              (negate (cut member <> '("." "..") string=))))
+           (delete-file-recursively "./agents")))))
     (arguments
-     ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'wrap 'fixup-agent-py
@@ -1128,13 +1152,13 @@ the KeepKey Hardware Wallet.")
                ;; Overwrite the wrapped one with the real thing.
                (install-file "./trezor_agent.py"
                              (string-append out "/bin"))
-             #t))))))
+               #t))))))
     (build-system python-build-system)
     (inputs
      `(("python-trezor" ,python-trezor)
        ("python-trezor-agent" ,python-trezor-agent)))
     (native-inputs
-     `(("python-hidapi" ,python-hidapi)))
+     `(("python-attrs" ,python-attrs)))
     (home-page "https://github.com/romanz/trezor-agent";)
     (synopsis "Using Trezor as hardware SSH/GPG agent")
     (description "This package allows using Trezor as a hardware SSH/GPG



reply via email to

[Prev in Thread] Current Thread [Next in Thread]