@ -19,15 +19,7 @@
} :
let
version = " 4 . 0 . 6 " ;
# electrum is not compatible with dnspython 2.0.0 yet
# use the latest 1.x release instead
py = python3 . override {
packageOverrides = self : super : {
dnspython = super . dnspython_1 ;
} ;
} ;
version = " 4 . 0 . 7 " ;
libsecp256k1_name =
if stdenv . isLinux then " l i b s e c p 2 5 6 k 1 . s o . 0 "
@ -43,7 +35,7 @@ let
owner = " s p e s m i l o " ;
repo = " e l e c t r u m " ;
rev = version ;
sha256 = " 0 m d b g 2 s q 5 6 n v 0 h x 0 r r c b g r v 1 l v 8 9 n q c 6 c q i g i v g k 6 6 5 h h j m 4 v 5 k q " ;
sha256 = " 0 6 v c b j 9 p 9 6 d 8 v 4 x j l y g z r 7 4 l q l l b 9 a d n 8 k 0 r a c a j z q 6 1 i j b 0 i m i 2 " ;
extraPostFetch = ''
mv $ out ./all
@ -52,13 +44,13 @@ let
} ;
in
py . pkgs . buildPythonApplication {
python3 . pkgs . buildPythonApplication {
pname = " e l e c t r u m " ;
inherit version ;
src = fetchurl {
url = " h t t p s : / / d o w n l o a d . e l e c t r u m . o r g / ${ version } / E l e c t r u m - ${ version } . t a r . g z " ;
sha256 = " 0 s p 8 p 7 2 0 g 3 r q n h 5 2 d d h a w 2 v 4 h j g p x c w b a c k w 9 q c 1 g 9 x a c 1 q 0 9 4 2 d " ;
sha256 = " 0 k 5 x f 9 7 g a 3 i x d 0 2 g 1 y 6 v 8 4 h b x d 8 y h v p j 5 i z 2 r h x s 8 w f n k f w i b z h 4 " ;
} ;
postUnpack = ''
@ -68,19 +60,18 @@ py.pkgs.buildPythonApplication {
nativeBuildInputs = stdenv . lib . optionals enableQt [ wrapQtAppsHook ] ;
propagatedBuildInputs = with py . pkgs ; [
propagatedBuildInputs = with python3 . pkgs ; [
aiohttp
aiohttp-socks
aiorpcx
attrs
bitstring
cryptography
dnspython
ecdsa
jsonrpclib-pelix
matplotlib
pbkdf2
protobuf
pycryptodomex
pysocks
qrcode
requests
@ -121,10 +112,15 @@ py.pkgs.buildPythonApplication {
wrapQtApp $ out/bin/electrum
'' ;
checkInputs = with py . pkgs ; [ pytest ] ;
checkInputs = with python3 . pkgs ; [ pytestCheckHook pycryptodomex ] ;
pytestFlagsArray = [ " e l e c t r u m / t e s t s " ] ;
disabledTests = [
" t e s t _ l o o p " # test tries to bind 127.0.0.1 causing permission error
] ;
checkPhase = ''
py . test electrum/tests
postCheck = ''
$ out/bin/electrum help > /dev/null
'' ;