2022-02-22 14:56:15 +00:00
|
|
|
{ lib, fetchurl, appimageTools, imagemagick }:
|
2021-03-31 17:36:23 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "chain-desktop-wallet";
|
|
|
|
version = "0.1.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2024-04-21 14:31:47 +00:00
|
|
|
url = "https://github.com/crypto-com/${pname}/releases/download/v${version}/${pname}-${version}-x86_64.AppImage";
|
2021-03-31 17:36:23 +00:00
|
|
|
sha256 = "12076hf8dlz0hg1pb2ixwlslrh8gi6s1iawnvhnn6vz4jmjvq356";
|
|
|
|
};
|
|
|
|
|
2024-04-21 14:31:47 +00:00
|
|
|
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
2021-03-31 17:36:23 +00:00
|
|
|
in appimageTools.wrapType2 rec {
|
2024-04-21 14:31:47 +00:00
|
|
|
inherit pname version src;
|
2021-03-31 17:36:23 +00:00
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
|
|
|
|
${imagemagick}/bin/convert ${appimageContents}/${pname}.png -resize 512x512 ${pname}_512.png
|
|
|
|
install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png
|
|
|
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
2021-04-17 10:38:37 +00:00
|
|
|
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U'
|
2021-03-31 17:36:23 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Crypto.org Chain desktop wallet (Beta)";
|
|
|
|
homepage = "https://github.com/crypto-com/chain-desktop-wallet";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ th0rgal ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "chain-desktop-wallet";
|
2021-03-31 17:36:23 +00:00
|
|
|
};
|
|
|
|
}
|