electron-cash: 4.3.1 -> 4.4.2, fix build and tests (#376281)
This commit is contained in:
commit
cb60862bbd
@ -1,15 +1,21 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, python3Packages, wrapQtAppsHook
|
{
|
||||||
, secp256k1, qtwayland }:
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
python3Packages,
|
||||||
|
qt5,
|
||||||
|
secp256k1,
|
||||||
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "electron-cash";
|
pname = "electron-cash";
|
||||||
version = "4.3.1";
|
version = "4.4.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Electron-Cash";
|
owner = "Electron-Cash";
|
||||||
repo = "Electron-Cash";
|
repo = "Electron-Cash";
|
||||||
tag = version;
|
tag = version;
|
||||||
sha256 = "sha256-xOyj5XerOwgfvI0qj7+7oshDvd18h5IeZvcJTis8nWo=";
|
sha256 = "sha256-hqaPxetS6JONvlRMjNonXUGFpdmnuadD00gcPzY07x0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
build-system = with python3Packages; [
|
build-system = with python3Packages; [
|
||||||
@ -38,6 +44,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
psutil
|
psutil
|
||||||
pycryptodomex
|
pycryptodomex
|
||||||
cryptography
|
cryptography
|
||||||
|
zxing-cpp
|
||||||
|
|
||||||
# requirements-hw
|
# requirements-hw
|
||||||
trezor
|
trezor
|
||||||
@ -49,36 +56,42 @@ python3Packages.buildPythonApplication rec {
|
|||||||
pysatochip
|
pysatochip
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ wrapQtAppsHook ];
|
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
|
buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qt5.qtwayland;
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace contrib/requirements/requirements.txt \
|
|
||||||
--replace "qdarkstyle==2.6.8" "qdarkstyle<3"
|
|
||||||
|
|
||||||
substituteInPlace setup.py \
|
|
||||||
--replace "(share_dir" "(\"share\""
|
|
||||||
'';
|
|
||||||
|
|
||||||
# If secp256k1 wasn't added to the library path, the following warning is given:
|
# If secp256k1 wasn't added to the library path, the following warning is given:
|
||||||
#
|
#
|
||||||
# Electron Cash was unable to find the secp256k1 library on this system.
|
# Electron Cash was unable to find the secp256k1 library on this system.
|
||||||
# Elliptic curve cryptography operations will be performed in slow
|
# Elliptic curve cryptography operations will be performed in slow
|
||||||
# Python-only mode.
|
# Python-only mode.
|
||||||
|
#
|
||||||
|
# Upstream hardcoded `libsecp256k1.so.0` where we provides
|
||||||
|
# `libsecp256k1.so.5`. The only breaking change is the removal of two
|
||||||
|
# functions which seem not used by electron-cash.
|
||||||
|
# See: <https://github.com/Electron-Cash/Electron-Cash/issues/3009>
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace-fail "(share_dir" '("share"'
|
||||||
|
substituteInPlace electroncash/secp256k1.py \
|
||||||
|
--replace-fail "libsecp256k1.so.0" "${secp256k1}/lib/libsecp256k1.so.5"
|
||||||
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
||||||
makeWrapperArgs+=(
|
|
||||||
"--prefix" "LD_LIBRARY_PATH" ":" "${secp256k1}/lib"
|
|
||||||
)
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
$out/bin/electron-cash help >/dev/null
|
output="$($out/bin/electron-cash help 2>&1)"
|
||||||
|
if [[ "$output" == *"failed to load"* ]]; then
|
||||||
|
echo "$output"
|
||||||
|
echo "Forbidden text detected: failed to load"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Bitcoin Cash SPV Wallet";
|
description = "Bitcoin Cash SPV Wallet";
|
||||||
mainProgram = "electron-cash";
|
mainProgram = "electron-cash";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
@ -88,8 +101,12 @@ python3Packages.buildPythonApplication rec {
|
|||||||
of the blockchain.
|
of the blockchain.
|
||||||
'';
|
'';
|
||||||
homepage = "https://www.electroncash.org/";
|
homepage = "https://www.electroncash.org/";
|
||||||
platforms = platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
maintainers = with maintainers; [ lassulus nyanloutre oxalica ];
|
maintainers = with lib.maintainers; [
|
||||||
license = licenses.mit;
|
lassulus
|
||||||
|
nyanloutre
|
||||||
|
oxalica
|
||||||
|
];
|
||||||
|
license = lib.licenses.mit;
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -13109,8 +13109,6 @@ with pkgs;
|
|||||||
inherit (darwin.apple_sdk.frameworks) AppKit;
|
inherit (darwin.apple_sdk.frameworks) AppKit;
|
||||||
};
|
};
|
||||||
|
|
||||||
electron-cash = libsForQt5.callPackage ../applications/misc/electron-cash { };
|
|
||||||
|
|
||||||
electrum = libsForQt5.callPackage ../applications/misc/electrum { };
|
electrum = libsForQt5.callPackage ../applications/misc/electrum { };
|
||||||
|
|
||||||
electrum-grs = libsForQt5.callPackage ../applications/misc/electrum/grs.nix { };
|
electrum-grs = libsForQt5.callPackage ../applications/misc/electrum/grs.nix { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user