Merge pull request #57594 from nyanloutre/electron-cash-update

Electron cash update
This commit is contained in:
Robert Schütz 2019-03-14 12:15:45 +01:00 committed by GitHub
commit aacd06eb5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 21 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python3Packages, qtbase, makeWrapper, lib }: { lib, fetchurl, python3Packages, qtbase, makeWrapper }:
let let
@ -7,14 +7,14 @@ let
in in
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
version = "3.3.2"; pname = "electron-cash";
name = "electron-cash-${version}"; version = "3.3.6";
src = fetchurl { src = fetchurl {
url = "https://electroncash.org/downloads/${version}/win-linux/ElectronCash-${version}.tar.gz"; url = "https://electroncash.org/downloads/${version}/win-linux/Electron-Cash-${version}.tar.gz";
# Verified using official SHA-1 and signature from # Verified using official SHA-1 and signature from
# https://github.com/fyookball/keys-n-hashes # https://github.com/fyookball/keys-n-hashes
sha256 = "4538044cfaa4f87a847635849e0733f32b183ac79abbd2797689c86dc3cb0d53"; sha256 = "ac435f2bf98b9b50c4bdcc9e3fb2ff19d9c66f8cce5df852f3a4727306bb0a84";
}; };
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3Packages; [
@ -30,6 +30,7 @@ python3Packages.buildPythonApplication rec {
qrcode qrcode
requests requests
tlslite-ng tlslite-ng
qdarkstyle
# plugins # plugins
keepkey keepkey
@ -40,25 +41,18 @@ python3Packages.buildPythonApplication rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
postPatch = '' postPatch = ''
# Remove pyqt5 check substituteInPlace contrib/requirements/requirements.txt \
sed -i '/pyqt5/d' setup.py --replace "qdarkstyle<2.6" "qdarkstyle<3"
'';
preBuild = '' substituteInPlace setup.py \
pyrcc5 icons.qrc -o gui/qt/icons_rc.py --replace "(share_dir" "(\"share\""
# Recording the creation timestamps introduces indeterminism to the build
sed -i '/Created: .*/d' gui/qt/icons_rc.py
''; '';
doCheck = false; doCheck = false;
postInstall = '' postInstall = ''
# These files are installed under $out/homeless-shelter ...
mv $out/${python.sitePackages}/homeless-shelter/.local/share $out
rm -rf $out/${python.sitePackages}/homeless-shelter
substituteInPlace $out/share/applications/electron-cash.desktop \ substituteInPlace $out/share/applications/electron-cash.desktop \
--replace "Exec=electron-cash %u" "Exec=$out/bin/electron-cash %u" --replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
# Please remove this when #44047 is fixed # Please remove this when #44047 is fixed
wrapProgram $out/bin/electron-cash \ wrapProgram $out/bin/electron-cash \
@ -70,17 +64,17 @@ python3Packages.buildPythonApplication rec {
$out/bin/electron-cash help >/dev/null $out/bin/electron-cash help >/dev/null
''; '';
meta = with stdenv.lib; { meta = with lib; {
description = "A lightweight Bitcoin wallet"; description = "A Bitcoin Cash SPV Wallet";
longDescription = '' longDescription = ''
An easy-to-use Bitcoin client featuring wallets generated from An easy-to-use Bitcoin Cash client featuring wallets generated from
mnemonic seeds (in addition to other, more advanced, wallet options) mnemonic seeds (in addition to other, more advanced, wallet options)
and the ability to perform transactions without downloading a copy and the ability to perform transactions without downloading a copy
of the blockchain. of the blockchain.
''; '';
homepage = https://www.electroncash.org/; homepage = https://www.electroncash.org/;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ lassulus ]; maintainers = with maintainers; [ lassulus nyanloutre ];
license = licenses.mit; license = licenses.mit;
}; };
} }

View File

@ -0,0 +1,22 @@
{ lib, fetchPypi, buildPythonPackage }:
buildPythonPackage rec {
pname = "qdarkstyle";
version = "2.6.5";
src = fetchPypi {
inherit version;
pname = "QDarkStyle";
sha256 = "96b14cd0440a0f73db4e14c5accdaa08072625d0395ae011d444508cbd73eb9e";
};
# No tests available
doCheck = false;
meta = with lib; {
description = "A dark stylesheet for Python and Qt applications";
homepage = https://github.com/ColinDuquesnoy/QDarkStyleSheet;
license = licenses.mit;
maintainers = with maintainers; [ nyanloutre ];
};
}

View File

@ -3992,6 +3992,8 @@ in {
retry_decorator = callPackage ../development/python-modules/retry_decorator { }; retry_decorator = callPackage ../development/python-modules/retry_decorator { };
qdarkstyle = callPackage ../development/python-modules/qdarkstyle { };
quamash = callPackage ../development/python-modules/quamash { }; quamash = callPackage ../development/python-modules/quamash { };
quandl = callPackage ../development/python-modules/quandl { }; quandl = callPackage ../development/python-modules/quandl { };