diff options
Diffstat (limited to 'pkgs/applications/misc/electrum')
-rw-r--r-- | pkgs/applications/misc/electrum/default.nix | 36 | ||||
-rw-r--r-- | pkgs/applications/misc/electrum/grs.nix | 15 | ||||
-rw-r--r-- | pkgs/applications/misc/electrum/ltc.nix | 1 | ||||
-rw-r--r-- | pkgs/applications/misc/electrum/update.nix | 20 |
4 files changed, 59 insertions, 13 deletions
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index 986681d5a819..eb24885ca142 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -9,10 +9,27 @@ , enableQt ? true , callPackage , qtwayland +, fetchPypi }: let - version = "4.5.3"; + version = "4.5.4"; + + python = python3.override { + self = python; + packageOverrides = self: super: { + # Pin ledger-bitcoin to 0.2.1 + ledger-bitcoin = super.ledger-bitcoin.overridePythonAttrs (oldAttrs: rec { + version = "0.2.1"; + format = "pyproject"; + src = fetchPypi { + pname = "ledger_bitcoin"; + inherit version; + hash = "sha256-AWl/q2MzzspNIo6yf30S92PgM/Ygsb+1lJsg7Asztso="; + }; + }); + }; + }; libsecp256k1_name = if stdenv.isLinux then "libsecp256k1.so.{v}" @@ -29,7 +46,7 @@ let owner = "spesmilo"; repo = "electrum"; rev = version; - sha256 = "sha256-Lr6ynHAbyaiaxYAWU5j5Wh5acxO5HkP1/jpnFrL4j68="; + sha256 = "sha256-fDu2PlEQOF7ftlS6dYw15S2XiAx+D/bng4zC9ELj6uk="; postFetch = '' mv $out ./all @@ -39,13 +56,13 @@ let in -python3.pkgs.buildPythonApplication { +python.pkgs.buildPythonApplication { pname = "electrum"; inherit version; src = fetchurl { url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; - sha256 = "sha256-kej0msc7SB+51ad5xZrT8MMEY5rfYOGqum6RO1gBH5s="; + sha256 = "sha256-lDuwXhOjcbCx8x/oIoigrklDwCbhn1trf5lDf/X/1Qc="; }; postUnpack = '' @@ -56,7 +73,7 @@ python3.pkgs.buildPythonApplication { nativeBuildInputs = lib.optionals enableQt [ wrapQtAppsHook ]; buildInputs = lib.optional (stdenv.isLinux && enableQt) qtwayland; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = with python.pkgs; [ aiohttp aiohttp-socks aiorpcx @@ -80,12 +97,15 @@ python3.pkgs.buildPythonApplication { ckcc-protocol keepkey trezor + bitbox02 + cbor + pyserial ] ++ lib.optionals enableQt [ pyqt5 qdarkstyle ]; - checkInputs = with python3.pkgs; lib.optionals enableQt [ + checkInputs = with python.pkgs; lib.optionals enableQt [ pyqt6 ]; @@ -117,7 +137,7 @@ python3.pkgs.buildPythonApplication { wrapQtApp $out/bin/electrum ''; - nativeCheckInputs = with python3.pkgs; [ pytestCheckHook pyaes pycryptodomex ]; + nativeCheckInputs = with python.pkgs; [ pytestCheckHook pyaes pycryptodomex ]; pytestFlagsArray = [ "tests" ]; @@ -140,7 +160,7 @@ python3.pkgs.buildPythonApplication { changelog = "https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES"; license = licenses.mit; platforms = platforms.all; - maintainers = with maintainers; [ joachifm np prusnak ]; + maintainers = with maintainers; [ joachifm np prusnak chewblacka ]; mainProgram = "electrum"; }; } diff --git a/pkgs/applications/misc/electrum/grs.nix b/pkgs/applications/misc/electrum/grs.nix index 87a85e9f986d..4ca911126c5b 100644 --- a/pkgs/applications/misc/electrum/grs.nix +++ b/pkgs/applications/misc/electrum/grs.nix @@ -10,7 +10,7 @@ }: let - version = "4.4.4"; + version = "4.5.4"; libsecp256k1_name = if stdenv.isLinux then "libsecp256k1.so.{v}" @@ -32,11 +32,11 @@ python3.pkgs.buildPythonApplication { owner = "Groestlcoin"; repo = "electrum-grs"; rev = "refs/tags/v${version}"; - sha256 = "0fl01qdvb1z6l6kwipj1lj0qmjk3mzw25wv7yh5j1hh1f5lng0s8"; + sha256 = "1k078jg3bw4n3kcxy917m30x1skxm679w8hcw8mlxb94ikrjc66h"; }; nativeBuildInputs = lib.optionals enableQt [ wrapQtAppsHook ]; - buildInputs = lib.optional stdenv.isLinux qtwayland; + buildInputs = lib.optional (stdenv.isLinux && enableQt) qtwayland; propagatedBuildInputs = with python3.pkgs; [ aiohttp @@ -56,17 +56,25 @@ python3.pkgs.buildPythonApplication { requests tlslite-ng certifi + jsonpatch # plugins btchip-python ledger-bitcoin ckcc-protocol keepkey trezor + bitbox02 + cbor + pyserial ] ++ lib.optionals enableQt [ pyqt5 qdarkstyle ]; + checkInputs = with python3.pkgs; lib.optionals enableQt [ + pyqt6 + ]; + postPatch = '' # make compatible with protobuf4 by easing dependencies ... substituteInPlace ./contrib/requirements/requirements.txt \ @@ -115,5 +123,6 @@ python3.pkgs.buildPythonApplication { license = licenses.mit; platforms = platforms.all; maintainers = with maintainers; [ gruve-p ]; + mainProgram = "electrum-grs"; }; } diff --git a/pkgs/applications/misc/electrum/ltc.nix b/pkgs/applications/misc/electrum/ltc.nix index 9b0c63834cfb..a85252027e96 100644 --- a/pkgs/applications/misc/electrum/ltc.nix +++ b/pkgs/applications/misc/electrum/ltc.nix @@ -127,6 +127,7 @@ python3.pkgs.buildPythonApplication { meta = with lib; { description = "Lightweight Litecoin Client"; + mainProgram = "electrum-ltc"; longDescription = '' Electrum-LTC is a simple, but powerful Litecoin wallet. A unique secret phrase (or “seed”) leaves intruders stranded and your peace of mind diff --git a/pkgs/applications/misc/electrum/update.nix b/pkgs/applications/misc/electrum/update.nix index 7a0fb8fd3eb6..509a64378088 100644 --- a/pkgs/applications/misc/electrum/update.nix +++ b/pkgs/applications/misc/electrum/update.nix @@ -4,6 +4,7 @@ , bash , coreutils , curl +, fetchurl , gnugrep , gnupg , gnused @@ -13,7 +14,22 @@ let downloadPageUrl = "https://download.electrum.org"; - signingKeys = ["6694 D8DE 7BE8 EE56 31BE D950 2BD5 824B 7F94 70E6"]; + signingKeys = lib.lists.map fetchurl [ + { + url = "https://github.com/spesmilo/electrum/raw/master/pubkeys/Emzy.asc"; + hash = "sha256-QG0cM6AKlSKFacVlhcso/xvrooUdF7oqoppyezt0hjE="; + } + { + url = "https://github.com/spesmilo/electrum/raw/master/pubkeys/ThomasV.asc"; + hash = "sha256-37ApVZlI+2EevxQIKXVKVpktt1Ls3UbWq4dfio2ORdo="; + } + { + url = "https://github.com/spesmilo/electrum/raw/master/pubkeys/sombernight_releasekey.asc"; + hash = "sha256-GgdPJ9TB5hh5SPCcTZURfqXkrU4qwl0dCci52V/wpdQ="; + } + ]; + + gpgImportPaths = lib.concatStringsSep " " signingKeys; in writeScript "update-electrum" '' @@ -48,7 +64,7 @@ sigFile=$srcFile.asc export GNUPGHOME=$PWD/gnupg mkdir -m 700 -p "$GNUPGHOME" -gpg --batch --recv-keys ${lib.concatStringsSep " " (map (x: "'${x}'") signingKeys)} +gpg --batch --import ${gpgImportPaths} gpg --batch --verify "$sigFile" "$srcFile" sha256=$(nix-prefetch-url --type sha256 "file://$PWD/$srcFile") |