Subject: [PATCH 1/4] gnu: trezor-agent: Update to 0.15.0.

From: [email-masked]
Date: Mon, 9 Sep 2024 16:28:20 +0200

From: Attila Lendvai <[email-masked]>

* gnu/packages/finance.scm (python-trezor-agent): Disable the test
called test_get_agent_sock_path.
(trezor-agent): Also copy the hash from the parent package.  Remove the now
unnecessary deletion of the ./contrib dir.

Change-Id: Ied03ad4c5d1266c208a1938d748eb09c52750633
---
 gnu/packages/finance.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 4b5b5eefd53..317842c5937 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -931,7 +931,7 @@ (define-public python-trezor-agent
   ;; the toplevel app called trezor-agent.
   (package
     (name "python-trezor-agent")
-    (version "0.14.7")
+    (version "0.15.0")
     (source
      (origin
        (method git-fetch)
@@ -940,7 +940,7 @@ (define-public python-trezor-agent
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "04dds5bbw73nk36zm8d02qw6qr92nrlcf8r1cq8ba96mzi34jbk0"))))
+        (base32 "09y55ys3x5krszh58yhl5gpdri0zrlhfld6psrmiyxfbp344asin"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -955,7 +955,15 @@ (define-public python-trezor-agent
          (add-after 'install 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "pytest" "-v")))))))
+               (invoke "pytest" "-v"))))
+         (add-before 'check 'disable-some-tests
+            (lambda _
+              ;; The path returned by gpgconf --list-dirs agent-socket in the
+              ;; builder is /homeless-shelter/.gnupg/S.gpg-agent, while the
+              ;; test expects a /run/user/... path.  Probably safe to disable.
+              (substitute* "libagent/gpg/tests/test_keyring.py"
+                (("def test_get_agent_sock_path")
+                 "def _do_not_test_get_agent_sock_path")))))))
     (propagated-inputs
      (list python-bech32
            python-configargparse
@@ -1227,8 +1235,7 @@ (define-public trezor-agent
        (method git-fetch)
        (uri (origin-uri (package-source python-trezor-agent)))
        (file-name (git-file-name name version))
-       (sha256
-        (base32 "04dds5bbw73nk36zm8d02qw6qr92nrlcf8r1cq8ba96mzi34jbk0"))
+       (hash (origin-hash (package-source python-trezor-agent)))
        (modules
         '((guix build utils)
           (ice-9 ftw)
@@ -1248,9 +1255,6 @@ (define-public trezor-agent
                      (scandir "./agents/trezor/"
                               (negate (cut member <> '("." "..") string=))))
            (delete-file-recursively "./agents")
-           ;; Without deleting ./contrib the sanity-check phase fails. Reported
-           ;; upstream as https://github.com/romanz/trezor-agent/issues/429.
-           (delete-file-recursively "./contrib")
            ;; Without deleting ./libagent setuptools complains as follows:
            ;; "error: Multiple top-level packages discovered in a flat-layout: ['contrib', 'libagent']."
            (delete-file-recursively "./libagent")))))

base-commit: b82c8ceae14d5d0f4584452f34f5103ffd0e0f8d
-- 
2.46.0