nixpkgs-suyu/pkgs/applications/blockchains/ledger-live-desktop/default.nix
nyanloutre 3ceb8d5990
ledger-live-desktop: 1.12.0 -> 1.15.0
built with appimageTools.wrapType2 instead of wrapping appimage-run
2019-09-28 18:07:53 +02:00

34 lines
1.2 KiB
Nix

{ stdenv, fetchurl, makeDesktopItem, appimageTools }:
let
pname = "ledger-live-desktop";
version = "1.15.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
sha256 = "0r7gm7q7gj39v36jd5xz20931za94nf2fpf3clbghkhlbrm0kbnq";
};
appimageContents = appimageTools.extractType2 {
inherit name src;
};
in appimageTools.wrapType2 rec {
inherit name src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/ledger-live-desktop.desktop $out/share/applications/ledger-live-desktop.desktop
install -m 444 -D ${appimageContents}/ledger-live-desktop.png $out/share/icons/hicolor/1024x1024/apps/ledger-live-desktop.png
substituteInPlace $out/share/applications/ledger-live-desktop.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with stdenv.lib; {
description = "Wallet app for Ledger Nano S and Ledger Blue";
homepage = "https://www.ledger.com/live";
license = licenses.mit;
maintainers = with maintainers; [ thedavidmeister nyanloutre ];
platforms = [ "x86_64-linux" ];
};
}