From 80ac5496be193c320a705b73fb0162d2875e75c4 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 10 Jul 2022 02:57:40 -0700 Subject: [PATCH] pkgs: ship zecwallet-lite as a patch instead of a custom pkg this allows me to more easily upstream it. --- nixpatches/08-zecwallet-lite.patch | 49 ++++++++++++++++++++++++++++++ nixpatches/list.nix | 2 ++ pkgs/overlay.nix | 2 +- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 nixpatches/08-zecwallet-lite.patch diff --git a/nixpatches/08-zecwallet-lite.patch b/nixpatches/08-zecwallet-lite.patch new file mode 100644 index 00000000..b5aafc5d --- /dev/null +++ b/nixpatches/08-zecwallet-lite.patch @@ -0,0 +1,49 @@ +diff --git a/pkgs/applications/blockchains/zecwallet-lite/default.nix b/pkgs/applications/blockchains/zecwallet-lite/default.nix +new file mode 100644 +index 00000000000..2a15d2fa923 +--- /dev/null ++++ b/pkgs/applications/blockchains/zecwallet-lite/default.nix +@@ -0,0 +1,30 @@ ++{ lib, fetchurl, appimageTools }: ++ ++appimageTools.wrapType2 rec { ++ pname = "zecwallet-lite"; ++ version = "1.7.13"; ++ ++ src = fetchurl { ++ url = "https://github.com/adityapk00/zecwallet-lite/releases/download/v${version}/Zecwallet.Lite-${version}.AppImage"; ++ hash = "sha256-uBiLGHBgm0vurfvOJjJ+RqVoGnVccEHTFO2T7LDqUzU="; ++ }; ++ ++ extraInstallCommands = ++ let contents = appimageTools.extract { inherit pname version src; }; ++ in '' ++ mv $out/bin/${pname}-${version} $out/bin/${pname} ++ ++ install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications ++ substituteInPlace $out/share/applications/${pname}.desktop \ ++ --replace 'Exec=AppRun' 'Exec=${pname}' ++ cp -r ${contents}/usr/share/icons $out/share ++ ''; ++ ++ meta = with lib; { ++ description = "A fully featured shielded wallet for Zcash"; ++ homepage = "https://www.zecwallet.co/"; ++ license = licenses.mit; ++ maintainers = with maintainers; [ colinsane ]; ++ platforms = [ "x86_64-linux" ]; ++ }; ++} +diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix +index 1c384a14b81..a7955f27117 100644 +--- a/pkgs/top-level/all-packages.nix ++++ b/pkgs/top-level/all-packages.nix +@@ -31776,6 +31776,8 @@ with pkgs; + + zcash = callPackage ../applications/blockchains/zcash { }; + ++ zecwallet-lite = callPackage ../applications/blockchains/zecwallet-lite { }; ++ + lightwalletd = callPackage ../applications/blockchains/lightwalletd { }; + + openethereum = callPackage ../applications/blockchains/openethereum { }; diff --git a/nixpatches/list.nix b/nixpatches/list.nix index 9f628a23..c5007869 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -16,4 +16,6 @@ fetchpatch: [ }) # TODO: upstream ./07-duplicity-rich-url.patch + # TODO: upstream + ./08-zecwallet-lite.patch ] diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index c98099e1..b9c7a131 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -28,6 +28,6 @@ #### TEMPORARY: PACKAGES WAITING TO BE UPSTREAMED kaiteki = prev.callPackage ./kaiteki { }; - zecwallet-lite = prev.callPackage ./zecwallet-lite { }; + # zecwallet-lite = prev.callPackage ./zecwallet-lite { }; })