Merge pull request #43390 from nyanloutre/pythonApplication.electron-cash.3.3
electron-cash: 3.1.6 -> 3.3.1
This commit is contained in:
commit
fd2b54be2d
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, python3Packages }:
|
{ stdenv, fetchurl, python3Packages, qtbase, makeWrapper, lib }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -7,14 +7,14 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
version = "3.1.6";
|
version = "3.3.1";
|
||||||
name = "electron-cash-${version}";
|
name = "electron-cash-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://electroncash.org/downloads/${version}/win-linux/ElectronCash-${version}.tar.gz";
|
url = "https://electroncash.org/downloads/${version}/win-linux/ElectronCash-${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 = "062k5iw0jcp10zxrffvgiyfg51c5xzs7gmm638icx01yy67d58dm";
|
sha256 = "1jdy89rfdwc2jadx3rqj5yvynpcn90cx6482ax9f1cj9gfxp9j2b";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
@ -36,13 +36,14 @@ python3Packages.buildPythonApplication rec {
|
|||||||
trezor
|
trezor
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Remove pyqt5 check
|
# Remove pyqt5 check
|
||||||
sed -i '/pyqt5/d' setup.py
|
sed -i '/pyqt5/d' setup.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
sed -i 's,usr_share = .*,usr_share = "'$out'/share",g' setup.py
|
|
||||||
pyrcc5 icons.qrc -o gui/qt/icons_rc.py
|
pyrcc5 icons.qrc -o gui/qt/icons_rc.py
|
||||||
# Recording the creation timestamps introduces indeterminism to the build
|
# Recording the creation timestamps introduces indeterminism to the build
|
||||||
sed -i '/Created: .*/d' gui/qt/icons_rc.py
|
sed -i '/Created: .*/d' gui/qt/icons_rc.py
|
||||||
@ -51,18 +52,21 @@ python3Packages.buildPythonApplication rec {
|
|||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# Despite setting usr_share above, these files are installed under
|
# These files are installed under $out/homeless-shelter ...
|
||||||
# $out/nix ...
|
mv $out/${python.sitePackages}/homeless-shelter/.local/share $out
|
||||||
mv $out/${python.sitePackages}/nix/store"/"*/share $out
|
rm -rf $out/${python.sitePackages}/homeless-shelter
|
||||||
rm -rf $out/${python.sitePackages}/nix
|
|
||||||
|
|
||||||
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 %u" "Exec=$out/bin/electron-cash %u"
|
||||||
|
|
||||||
|
# Please remove this when #44047 is fixed
|
||||||
|
wrapProgram $out/bin/electron-cash \
|
||||||
|
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
$out/bin/electrum help >/dev/null
|
$out/bin/electron-cash help >/dev/null
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user