electrum: grab tests from github, but use signed sources

Not crazy about this solution, but seems better than
not running tests or ignoring upstream's signatures.
This commit is contained in:
Will Dietz 2019-05-09 15:30:05 -05:00
parent a879c72552
commit 66493d7bff
No known key found for this signature in database
GPG Key ID: EBB0EA4124809D02

@ -1,6 +1,8 @@
{ stdenv, fetchurl, python3, python3Packages, zbar, secp256k1 }:
{ stdenv, fetchurl, fetchFromGitHub, python3, python3Packages, zbar, secp256k1 }:
let
version = "3.3.5";
qdarkstyle = python3Packages.buildPythonPackage rec {
pname = "QDarkStyle";
version = "2.5.4";
@ -10,17 +12,35 @@ let
};
doCheck = false; # no tests
};
# Not provided in official source releases, which are what upstream signs.
tests = fetchFromGitHub {
owner = "spesmilo";
repo = "electrum";
rev = version;
sha256 = "11rzzrv5xxqazcb7q1ig93d6cisqmd1x0jrgvfgzysbzvi51gg11";
extraPostFetch = ''
mv $out ./all
mv ./all/electrum/tests $out
'';
};
in
python3Packages.buildPythonApplication rec {
pname = "electrum";
version = "3.3.5";
inherit version;
src = fetchurl {
url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
sha256 = "1csj0n96zlajnrs39wsazfj5lmy7v7n77cdz56lr8nkmchh6k9z1";
};
postUnpack = ''
# can't symlink, tests get confused
cp -ar ${tests} $sourceRoot/electrum/tests
'';
propagatedBuildInputs = with python3Packages; [
aiorpcx
aiohttp