Skip to content

Commit

Permalink
electrum: 4.0.6 -> 4.0.7
Browse files Browse the repository at this point in the history
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
  • Loading branch information
prusnak committed Dec 9, 2020
1 parent 253de1f commit 16b38b0
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions pkgs/applications/misc/electrum/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -43,7 +35,7 @@ let
owner = "spesmilo";
repo = "electrum";
rev = version;
sha256 = "0mdbg2sq56nv0hx0rrcbgrv1lv89nqc6cqigivgk665hhjm4v5kq";
sha256 = "06vcbj9p96d8v4xjlygzr74lqllb9adn8k0racajzq61ijb0imi2";

extraPostFetch = ''
mv $out ./all
Expand 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 = ''
Expand All @@ -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
Expand Down Expand Up @@ -121,10 +112,15 @@ py.pkgs.buildPythonApplication {
wrapQtApp $out/bin/electrum
'';

checkInputs = with py.pkgs; [ pytest ];
checkInputs = with python3.pkgs; [ pytestCheckHook pycryptodomex ];

pytestFlagsArray = [ "electrum/tests" ];

disabledTests = [
"test_loop" # test tries to bind 127.0.0.1 causing permission error
];

checkPhase = ''
py.test electrum/tests
postCheck = ''
$out/bin/electrum help >/dev/null
'';

Expand Down

0 comments on commit 16b38b0

Please sign in to comment.