From 16b38b07821de532b33aedaf85b45dbbc0a38e39 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 9 Dec 2020 16:39:51 +0100 Subject: [PATCH] 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 --- pkgs/applications/misc/electrum/default.nix | 32 +++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index df6c99768e84..3322fbee7127 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -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 "libsecp256k1.so.0" @@ -43,7 +35,7 @@ let owner = "spesmilo"; repo = "electrum"; rev = version; - sha256 = "0mdbg2sq56nv0hx0rrcbgrv1lv89nqc6cqigivgk665hhjm4v5kq"; + sha256 = "06vcbj9p96d8v4xjlygzr74lqllb9adn8k0racajzq61ijb0imi2"; extraPostFetch = '' mv $out ./all @@ -52,13 +44,13 @@ let }; in -py.pkgs.buildPythonApplication { +python3.pkgs.buildPythonApplication { pname = "electrum"; inherit version; src = fetchurl { url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; - sha256 = "0sp8p720g3rqnh52ddhaw2v4hjgpxcwbackw9qc1g9xac1q0942d"; + sha256 = "0k5xf97ga3ixd02g1y6v84hbxd8yhvpj5iz2rhxs8wfnkfwibzh4"; }; 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 ]; - checkPhase = '' - py.test electrum/tests + pytestFlagsArray = [ "electrum/tests" ]; + + disabledTests = [ + "test_loop" # test tries to bind 127.0.0.1 causing permission error + ]; + + postCheck = '' $out/bin/electrum help >/dev/null '';