Subject: [PATCH] gnu: electrum: Update to 4.0.5.

From: dftxbs3e <[email-masked]>
Date: Tue, 01 Dec 2020 09:58:23 +0100

Hello!

I attached all patches generated by git format-patch. They are numbered
in the order they must be applied, I hope that will be OK.

Thank you!
From 1e95f5cc36aff2811865f4cb575b7935fb72ab38 Mon Sep 17 00:00:00 2001
From: John Doe <[email-masked]>
Date: Tue, 1 Dec 2020 09:45:44 +0100
Subject: [PATCH 7/7] gnu: electrum: Update to 4.0.5.

* gnu/packages/finance.scm (electrum): Update to 4.0.5.
[inputs]: Remove.
[propagated-inputs]: Add python-pyqt, python-ecdsa, python-qrcode,
python-protobuf, python-aiohttp, python-aiohttp-socks, python-aiorpcx,
python-certifi, python-bitstring, python-attrs, python-cryptography,
python-qdarkstyle, python-dnspython and libsecp256k1.
[arguments]: Copy 'use-libsecp256k1-input phase from
(electron-cash) to #:phases to fix runtime lookup of libsecp256k1
library.
---
 gnu/packages/finance.scm | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index a79c70d1e0..e7b83eec20 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -493,7 +493,7 @@ do so.")
 (define-public electrum
   (package
     (name "electrum")
-    (version "3.3.8")
+    (version "4.0.5")
     (source
      (origin
        (method url-fetch)
@@ -501,7 +501,7 @@ do so.")
                            version "/Electrum-"
                            version ".tar.gz"))
        (sha256
-        (base32 "1g00cj1pmckd4xis8r032wmraiv3vd3zc803hnyxa2bnhj8z3bg2"))
+        (base32 "06ml9lwa5k2dp56sm5s7dsl6qirqmgim7rn853cqcq9n45z41437"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -509,22 +509,21 @@ do so.")
            (delete-file-recursively "packages")
            #t))))
     (build-system python-build-system)
-    (inputs
-     `(("python-pyaes" ,python-pyaes)
-       ("python-pysocks" ,python-pysocks)
-       ("python-sip" ,python-sip)
-       ("python-pyqt" ,python-pyqt)
+    (propagated-inputs
+     `(("python-pyqt" ,python-pyqt)
        ("python-ecdsa" ,python-ecdsa)
-       ("python-pbkdf2" ,python-pbkdf2)
-       ("python-requests" ,python-requests)
        ("python-qrcode" ,python-qrcode)
        ("python-protobuf" ,python-protobuf)
        ("python-aiohttp" ,python-aiohttp)
        ("python-aiohttp-socks" ,python-aiohttp-socks)
        ("python-aiorpcx" ,python-aiorpcx)
        ("python-certifi" ,python-certifi)
+       ("python-bitstring" ,python-bitstring)
+       ("python-attrs" ,python-attrs)
+       ("python-cryptography" ,python-cryptography)
+       ("python-qdarkstyle" ,python-qdarkstyle)
        ("python-dnspython" ,python-dnspython)
-       ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)))
+       ("libsecp256k1" ,libsecp256k1)))
     (arguments
      `(#:tests? #f                      ; no tests
        #:phases
@@ -538,7 +537,14 @@ do so.")
                (substitute* "setup.py"
                  (("sys\\.prefix")
                   (format #f "\"~a\"" out)))
-               #t))))))
+               #t)))
+         (add-after 'unpack 'use-libsecp256k1-input
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "electrum/ecc_fast.py"
+               (("library_paths = .* 'libsecp256k1.so.0'.")
+                (string-append "library_paths = ('"
+                               (assoc-ref inputs "libsecp256k1")
+                               "/lib/libsecp256k1.so.0'"))))))))
     (home-page "https://electrum.org/")
     (synopsis "Bitcoin wallet")
     (description
-- 
2.28.0

From 3664e9494ee427a3155f21398d189d02ed35c3c4 Mon Sep 17 00:00:00 2001
From: John Doe <[email-masked]>
Date: Tue, 1 Dec 2020 09:36:51 +0100
Subject: [PATCH 6/7] gnu: libsecp256k1: Update to 20200615-1-dbd41db.

* gnu/packages/crypto.scm (libsecp256k1):
[commit]: Set to "dbd41db16a0e91b2566820898a3ab2d7dad4fe00".
[version]: Bump to 20200615-1-dbd41db.
[arguments]: Add "--enable-module-recovery",
"--enable-experimental", "--enable-module-ecdh" and
"--enable-shared" to #:configure-flags.
---
 gnu/packages/crypto.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 1b51366d7e..f0fc1ec5a3 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -1028,10 +1028,10 @@ trivial to build for local use.  Portability is emphasized over performance.")
     (license license:unlicense)))
 
 (define-public libsecp256k1
-  (let ((commit "d644dda5c9dbdecee52d1aa259235510fdc2d4ee"))
+  (let ((commit "dbd41db16a0e91b2566820898a3ab2d7dad4fe00"))
     (package
       (name "libsecp256k1")
-      (version (git-version "20191213" "1" commit))
+      (version (git-version "20200615" "1" commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -1039,9 +1039,14 @@ trivial to build for local use.  Portability is emphasized over performance.")
                       (commit commit)))
                 (sha256
                  (base32
-                  "0zmx32746khsm2cx0p3pdy3j2vkwmafvf7axiixijhgcg0xjv93i"))
+                  "1fcpnksq5cqwqzshn5f0lq94b73p3frwbp04hgmmbnrndpqg6mpy"))
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
+      (arguments
+	'(#:configure-flags '("--enable-module-recovery"
+			      "--enable-experimental"
+			      "--enable-module-ecdh"
+			      "--enable-shared")))
       (native-inputs
        `(("autoconf" ,autoconf)
          ("automake" ,automake)
-- 
2.28.0

From 59c210ccdd43348601c0fe142c5d2c0feee38bf9 Mon Sep 17 00:00:00 2001
From: John Doe <[email-masked]>
Date: Tue, 1 Dec 2020 08:34:13 +0100
Subject: [PATCH 5/7] gnu: python-aiohttp-socks: Update to 0.5.5.

* gnu/packages/python-web.scm (python-aiohttp-socks):
[version]: Bump to 0.5.5.
[propagated-inputs]: Add python-socks, python-attrs.
---
 gnu/packages/python-web.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 107f579ad6..797d94f12a 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -166,17 +166,19 @@ Callback Hell.
 (define-public python-aiohttp-socks
   (package
     (name "python-aiohttp-socks")
-    (version "0.2.2")
+    (version "0.5.5")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "aiohttp_socks" version))
        (sha256
         (base32
-         "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"))))
+         "0jmhb0l1w8k1nishij3awd9zv8zbyb5l35a2pdalrqxxasbhbcif"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-aiohttp" ,python-aiohttp)))
+     `(("python-aiohttp" ,python-aiohttp)
+       ("python-attrs" ,python-attrs)
+       ("python-socks" ,python-socks)))
     (home-page "https://github.com/romis2012/aiohttp-socks")
     (synopsis "SOCKS proxy connector for aiohttp")
     (description "This package provides a SOCKS proxy connector for
-- 
2.28.0

From 290ec654f15c02f51c15c84506ce94570934497d Mon Sep 17 00:00:00 2001
From: John Doe <[email-masked]>
Date: Tue, 1 Dec 2020 08:21:52 +0100
Subject: [PATCH 4/7] gnu: Add python-socks.

* gnu/packages/python-xyz.scm (python-socks): New variable.
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3c170ebe3c..feffad00b3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23325,3 +23325,29 @@ process.")
     (description
       "Simple construction, analysis and modification of binary data.")
     (license license:expat)))
+
+(define-public python-socks
+  (package
+    (name "python-socks")
+    (version "1.1.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "python-socks" version))
+        (sha256
+          (base32
+            "1y9sp0hijywjrqwpjgpq3yjmfm6s0rj1br19xm77ffk72w5pdr26"))))
+    (build-system python-build-system)
+    (propagated-inputs
+      ;; For python-socks[asyncio]
+      `(("python-async-timeout" ,python-async-timeout)))
+    (native-inputs
+      `(("python-trio" ,python-trio)
+	("python-curio" ,python-curio)))
+    (home-page
+      "https://github.com/romis2012/python-socks")
+    (synopsis
+      "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python")
+    (description
+      "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python")
+    (license license:asl2.0)))
-- 
2.28.0

From 6945ad2c40bcd76236bcca8617f7654e92e9cc72 Mon Sep 17 00:00:00 2001
From: John Doe <[email-masked]>
Date: Tue, 1 Dec 2020 06:19:05 +0100
Subject: [PATCH 3/7] gnu: Add python-bitstring.

* gnu/packages/python-xyz.scm (python-bitstring): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 758496d52f..3c170ebe3c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23305,3 +23305,23 @@ process.")
     (description
       "The most complete dark stylesheet for Python and Qt applications")
     (license license:expat)))
+
+(define-public python-bitstring
+  (package
+    (name "python-bitstring")
+    (version "3.1.7")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "bitstring" version))
+        (sha256
+          (base32
+            "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
+    (build-system python-build-system)
+    (home-page
+      "https://github.com/scott-griffiths/bitstring")
+    (synopsis
+      "Simple construction, analysis and modification of binary data.")
+    (description
+      "Simple construction, analysis and modification of binary data.")
+    (license license:expat)))
-- 
2.28.0

From 31f912728b017d04ea6ce164e07d6e44d1df9401 Mon Sep 17 00:00:00 2001
From: John Doe <[email-masked]>
Date: Tue, 1 Dec 2020 07:31:59 +0100
Subject: [PATCH 2/7] gnu: Add python-qdarkstyle.

* gnu/packages/python-xyz.scm (python-qdarkstyle): New variable.
---
 gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 36373ae71c..758496d52f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23278,3 +23278,30 @@ process.")
     (description
       "HelpDev - Extracts information about the Python environment easily.")
     (license license:expat)))
+
+(define-public python-qdarkstyle
+  (package
+    (name "python-qdarkstyle")
+    (version "2.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "QDarkStyle" version))
+        (sha256
+          (base32
+            "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
+    (build-system python-build-system)
+    (arguments
+      `(;; Fails unable to detect valid Qt bindings even if you
+	;; add them as native-inputs.
+	#:tests? #f))
+    (propagated-inputs
+      `(("python-helpdev" ,python-helpdev)
+        ("python-qtpy" ,python-qtpy)))
+    (home-page
+      "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
+    (synopsis
+      "The most complete dark stylesheet for Python and Qt applications")
+    (description
+      "The most complete dark stylesheet for Python and Qt applications")
+    (license license:expat)))
-- 
2.28.0

From 5d439ae49ae55abf5c8e908032ffb405c1cbc1ba Mon Sep 17 00:00:00 2001
From: John Doe <[email-masked]>
Date: Tue, 1 Dec 2020 07:27:54 +0100
Subject: [PATCH 1/7] gnu: Add python-helpdev.

* gnu/packages/python-xyz.scm (python-helpdev): New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ad51498050..36373ae71c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23256,3 +23256,25 @@ process.")
     (description
       "Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
     (license license:expat)))
+
+(define-public python-helpdev
+  (package
+    (name "python-helpdev")
+    (version "0.7.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "helpdev" version))
+        (sha256
+          (base32
+            "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
+    (build-system python-build-system)
+    (propagated-inputs
+      `(("python-importlib-metadata"
+         ,python-importlib-metadata)))
+    (home-page "https://gitlab.com/dpizetta/helpdev")
+    (synopsis
+      "HelpDev - Extracts information about the Python environment easily.")
+    (description
+      "HelpDev - Extracts information about the Python environment easily.")
+    (license license:expat)))
-- 
2.28.0