electrum: 4.0.6 -> 4.0.7

this release also fixes compatibility with dnspython 2.x,
so we can drop the overrides

also cryptography is required instead of pycryptodomex
(which is required only for tests now) and ecdsa dependency
is dropped completely
This commit is contained in:
Pavol Rusnak 2020-12-09 16:39:51 +01:00
parent 253de1fcdb
commit 16b38b0782
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
1 changed files with 14 additions and 18 deletions

View File

@ -19,15 +19,7 @@
}: }:
let let
version = "4.0.6"; version = "4.0.7";
# 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;
};
};
libsecp256k1_name = libsecp256k1_name =
if stdenv.isLinux then "libsecp256k1.so.0" if stdenv.isLinux then "libsecp256k1.so.0"
@ -43,7 +35,7 @@ let
owner = "spesmilo"; owner = "spesmilo";
repo = "electrum"; repo = "electrum";
rev = version; rev = version;
sha256 = "0mdbg2sq56nv0hx0rrcbgrv1lv89nqc6cqigivgk665hhjm4v5kq"; sha256 = "06vcbj9p96d8v4xjlygzr74lqllb9adn8k0racajzq61ijb0imi2";
extraPostFetch = '' extraPostFetch = ''
mv $out ./all mv $out ./all
@ -52,13 +44,13 @@ let
}; };
in in
py.pkgs.buildPythonApplication { python3.pkgs.buildPythonApplication {
pname = "electrum"; pname = "electrum";
inherit version; inherit version;
src = fetchurl { src = fetchurl {
url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
sha256 = "0sp8p720g3rqnh52ddhaw2v4hjgpxcwbackw9qc1g9xac1q0942d"; sha256 = "0k5xf97ga3ixd02g1y6v84hbxd8yhvpj5iz2rhxs8wfnkfwibzh4";
}; };
postUnpack = '' postUnpack = ''
@ -68,19 +60,18 @@ py.pkgs.buildPythonApplication {
nativeBuildInputs = stdenv.lib.optionals enableQt [ wrapQtAppsHook ]; nativeBuildInputs = stdenv.lib.optionals enableQt [ wrapQtAppsHook ];
propagatedBuildInputs = with py.pkgs; [ propagatedBuildInputs = with python3.pkgs; [
aiohttp aiohttp
aiohttp-socks aiohttp-socks
aiorpcx aiorpcx
attrs attrs
bitstring bitstring
cryptography
dnspython dnspython
ecdsa
jsonrpclib-pelix jsonrpclib-pelix
matplotlib matplotlib
pbkdf2 pbkdf2
protobuf protobuf
pycryptodomex
pysocks pysocks
qrcode qrcode
requests requests
@ -121,10 +112,15 @@ py.pkgs.buildPythonApplication {
wrapQtApp $out/bin/electrum wrapQtApp $out/bin/electrum
''; '';
checkInputs = with py.pkgs; [ pytest ]; checkInputs = with python3.pkgs; [ pytestCheckHook pycryptodomex ];
checkPhase = '' pytestFlagsArray = [ "electrum/tests" ];
py.test electrum/tests
disabledTests = [
"test_loop" # test tries to bind 127.0.0.1 causing permission error
];
postCheck = ''
$out/bin/electrum help >/dev/null $out/bin/electrum help >/dev/null
''; '';