1 { lib, fetchurl, appimageTools, imagemagick }:
4 pname = "chain-desktop-wallet";
6 name = "${pname}-${version}";
9 url = "https://github.com/crypto-com/${pname}/releases/download/v${version}/${name}-x86_64.AppImage";
10 sha256 = "12076hf8dlz0hg1pb2ixwlslrh8gi6s1iawnvhnn6vz4jmjvq356";
13 appimageContents = appimageTools.extractType2 { inherit name src; };
14 in appimageTools.wrapType2 rec {
17 extraInstallCommands = ''
18 mv $out/bin/${name} $out/bin/${pname}
19 install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
20 ${imagemagick}/bin/convert ${appimageContents}/${pname}.png -resize 512x512 ${pname}_512.png
21 install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png
22 substituteInPlace $out/share/applications/${pname}.desktop \
23 --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U'
27 description = "Crypto.org Chain desktop wallet (Beta)";
28 homepage = "https://github.com/crypto-com/chain-desktop-wallet";
29 license = licenses.asl20;
30 maintainers = with maintainers; [ th0rgal ];
31 platforms = [ "x86_64-linux" ];