From 70d4dea905410fd47f25c7ab6d2e588c1e743e77 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 1 Nov 2024 19:13:59 +0100 Subject: [PATCH 1/5] electron-cash: format using nixfmt --- .../applications/misc/electron-cash/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix index e9854ac3ef94d..b58a6c6f1d2b5 100644 --- a/pkgs/applications/misc/electron-cash/default.nix +++ b/pkgs/applications/misc/electron-cash/default.nix @@ -1,5 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, python3Packages, wrapQtAppsHook -, secp256k1, qtwayland }: +{ + lib, + stdenv, + fetchFromGitHub, + python3Packages, + wrapQtAppsHook, + secp256k1, + qtwayland, +}: python3Packages.buildPythonApplication rec { pname = "electron-cash"; @@ -94,7 +101,11 @@ python3Packages.buildPythonApplication rec { ''; homepage = "https://www.electroncash.org/"; platforms = platforms.unix; - maintainers = with maintainers; [ lassulus nyanloutre oxalica ]; + maintainers = with maintainers; [ + lassulus + nyanloutre + oxalica + ]; license = licenses.mit; }; } From 2e9a045568a9237fb0f45337e940e0718b715f94 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 1 Nov 2024 19:16:05 +0100 Subject: [PATCH 2/5] electron-cash: use --replace-fail instead of --replace --- pkgs/applications/misc/electron-cash/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix index b58a6c6f1d2b5..65e0d986a8b07 100644 --- a/pkgs/applications/misc/electron-cash/default.nix +++ b/pkgs/applications/misc/electron-cash/default.nix @@ -62,15 +62,15 @@ python3Packages.buildPythonApplication rec { postPatch = '' substituteInPlace contrib/requirements/requirements.txt \ - --replace "qdarkstyle==2.6.8" "qdarkstyle<3" + --replace-fail "qdarkstyle==2.6.8" "qdarkstyle<3" substituteInPlace setup.py \ - --replace "(share_dir" "(\"share\"" + --replace-fail "(share_dir" "(\"share\"" ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace $out/share/applications/electron-cash.desktop \ - --replace "Exec=electron-cash" "Exec=$out/bin/electron-cash" + --replace-fail "Exec=electron-cash" "Exec=$out/bin/electron-cash" ''; # If secp256k1 wasn't added to the library path, the following warning is given: From 228fef9b4812d93a3538e01b0478294568832633 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 1 Nov 2024 19:21:42 +0100 Subject: [PATCH 3/5] electron-cash: remove with lib; from meta --- pkgs/applications/misc/electron-cash/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix index 65e0d986a8b07..7125e114fee3d 100644 --- a/pkgs/applications/misc/electron-cash/default.nix +++ b/pkgs/applications/misc/electron-cash/default.nix @@ -90,7 +90,7 @@ python3Packages.buildPythonApplication rec { $out/bin/electron-cash help >/dev/null ''; - meta = with lib; { + meta = { description = "Bitcoin Cash SPV Wallet"; mainProgram = "electron-cash"; longDescription = '' @@ -100,12 +100,12 @@ python3Packages.buildPythonApplication rec { of the blockchain. ''; homepage = "https://www.electroncash.org/"; - platforms = platforms.unix; - maintainers = with maintainers; [ + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ lassulus nyanloutre oxalica ]; - license = licenses.mit; + license = lib.licenses.mit; }; } From d50723b37931d4c0d75ffd141556d71188acec06 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 1 Nov 2024 19:22:12 +0100 Subject: [PATCH 4/5] electron-cash: 4.3.1 -> 4.4.1 --- pkgs/applications/misc/electron-cash/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix index 7125e114fee3d..fe8a63c1156d5 100644 --- a/pkgs/applications/misc/electron-cash/default.nix +++ b/pkgs/applications/misc/electron-cash/default.nix @@ -10,13 +10,13 @@ python3Packages.buildPythonApplication rec { pname = "electron-cash"; - version = "4.3.1"; + version = "4.4.1"; src = fetchFromGitHub { owner = "Electron-Cash"; repo = "Electron-Cash"; rev = "refs/tags/${version}"; - sha256 = "sha256-xOyj5XerOwgfvI0qj7+7oshDvd18h5IeZvcJTis8nWo="; + sha256 = "sha256-4cKlDJRFHt+FQ1ycO1Jz/stdhj9omiLu2G2vk7WmsIc="; }; build-system = with python3Packages; [ @@ -61,9 +61,6 @@ python3Packages.buildPythonApplication rec { buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland; postPatch = '' - substituteInPlace contrib/requirements/requirements.txt \ - --replace-fail "qdarkstyle==2.6.8" "qdarkstyle<3" - substituteInPlace setup.py \ --replace-fail "(share_dir" "(\"share\"" ''; From 76e30b05193f1d0d1627c2c6c7833c51cbf2a481 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Fri, 1 Nov 2024 20:06:31 +0100 Subject: [PATCH 5/5] electron-cash: move to by-name --- .../default.nix => by-name/el/electron-cash/package.nix} | 7 +++---- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) rename pkgs/{applications/misc/electron-cash/default.nix => by-name/el/electron-cash/package.nix} (96%) diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/by-name/el/electron-cash/package.nix similarity index 96% rename from pkgs/applications/misc/electron-cash/default.nix rename to pkgs/by-name/el/electron-cash/package.nix index fe8a63c1156d5..7707a6d93dbb8 100644 --- a/pkgs/applications/misc/electron-cash/default.nix +++ b/pkgs/by-name/el/electron-cash/package.nix @@ -3,9 +3,8 @@ stdenv, fetchFromGitHub, python3Packages, - wrapQtAppsHook, + qt5, secp256k1, - qtwayland, }: python3Packages.buildPythonApplication rec { @@ -56,9 +55,9 @@ python3Packages.buildPythonApplication rec { pysatochip ]; - nativeBuildInputs = [ wrapQtAppsHook ]; + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; - buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland; + buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qt5.qtwayland; postPatch = '' substituteInPlace setup.py \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a166b3ed1e528..5ce4c69aa7673 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28610,8 +28610,6 @@ with pkgs; oed = callPackage ../applications/editors/oed { }; - electron-cash = libsForQt5.callPackage ../applications/misc/electron-cash { }; - electrum = libsForQt5.callPackage ../applications/misc/electrum { }; electrum-grs = libsForQt5.callPackage ../applications/misc/electrum/grs.nix { };