about summary refs log tree commit diff
path: root/pkgs/applications/blockchains/zecwallet-lite/default.nix
blob: 27004722c38e26ce0336ccce8159936d30a1e14f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, fetchurl, appimageTools }:

appimageTools.wrapType2 rec {
  pname = "zecwallet-lite";
  version = "1.8.8";

  src = fetchurl {
    url = "https://github.com/adityapk00/zecwallet-lite/releases/download/v${version}/Zecwallet.Lite-${version}.AppImage";
    hash = "sha256-6jppP3V7R8tCR5Wv5UWfbWKkAdsgrCjSiO/bbpLNcw4=";
  };

  extraInstallCommands =
    let contents = appimageTools.extract { inherit pname version src; };
    in ''
      mv $out/bin/${pname}-${version} $out/bin/${pname}

      install -m 444 -D ${contents}/zecwallet-lite.desktop -t $out/share/applications
      substituteInPlace $out/share/applications/zecwallet-lite.desktop \
        --replace 'Exec=AppRun' "Exec=$out/bin/zecwallet-lite"
      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" ];
    mainProgram = "zecwallet-lite";
  };
}