summary refs log tree commit diff
path: root/gnu/packages/finance.scm
diff options
context:
space:
mode:
authorAttila Lendvai <attila@lendvai.name>2021-11-28 21:19:30 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2021-11-28 21:31:08 +0100
commit857098830bcfcb864d0375d59fbf79c2dbfd6c5b (patch)
treeb110fd91f5280f53a5a75a0c649eeed2f444a4d8 /gnu/packages/finance.scm
parentbf90403f42556bd1b80773723a3c04b404641d08 (diff)
downloadguix-857098830bcfcb864d0375d59fbf79c2dbfd6c5b.tar.gz
gnu: python-trezor: Update to 0.12.3.
* gnu/packages/finance.scm (python-trezor): Update to 0.12.3.
[source]: Use GitHub repository.
[propagated-inputs]: Add python-attrs.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/finance.scm')
-rw-r--r--gnu/packages/finance.scm36
1 files changed, 29 insertions, 7 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 334a3e7a90..08639e26d5 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -992,16 +992,38 @@ Nano dongle.")
 (define-public python-trezor
   (package
     (name "python-trezor")
-    (version "0.12.1")
+    (version "0.12.3")
     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "trezor" version))
-        (sha256
-          (base32 "1w19m9lws55k9sjhras47hpfpqwq1jm5vy135nj65yhkblygqg19"))))
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/trezor/trezor-firmware/")
+             (commit (string-append "python/v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0wdm1y5zli6w09zbpjqc6rbcs1b4hjq007mbh7xdr17prbnqprac"))
+       (modules
+        '((guix build utils)
+          (srfi srfi-26)
+          (srfi srfi-1)
+          (ice-9 ftw)))
+       (snippet
+        '(begin
+           ;; Delete everything except ./python/
+           (for-each delete-file-recursively
+                     (scandir "./" (negate (cut member <> '("python" "." "..")
+                                                string=))))
+           ;; Move ./python/* to the toplevel.
+           (for-each (lambda (file-name)
+                       (rename-file (string-append "./python/" file-name)
+                                    (string-append "./" file-name)))
+                     (scandir "./python/"
+                              (negate (cut member <> '("." "..") string=))))
+           (delete-file-recursively "./python")))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-click" ,python-click)
+     `(("python-attrs" ,python-attrs)
+       ("python-click" ,python-click)
        ("python-construct" ,python-construct)
        ("python-ecdsa" ,python-ecdsa)
        ("python-libusb1" ,python-libusb1)