2021-02-27 14:57:25 +00:00
|
|
|
{ lib, fetchurl, appimageTools, imagemagick }:
|
2019-08-04 10:37:12 +01:00
|
|
|
|
2019-09-28 17:07:53 +01:00
|
|
|
let
|
2019-08-04 10:37:12 +01:00
|
|
|
pname = "ledger-live-desktop";
|
2021-06-30 16:17:15 +01:00
|
|
|
version = "2.29.0";
|
2019-09-28 17:07:53 +01:00
|
|
|
name = "${pname}-${version}";
|
2019-08-04 10:37:12 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
|
2021-06-30 16:17:15 +01:00
|
|
|
sha256 = "1y4xvnwh2mqbc39pmnpgjg8mlx208s2pipm7dazq4bgmay7k9zh0";
|
2019-08-04 10:37:12 +01:00
|
|
|
};
|
|
|
|
|
2019-09-28 17:07:53 +01:00
|
|
|
appimageContents = appimageTools.extractType2 {
|
|
|
|
inherit name src;
|
2019-08-04 10:37:12 +01:00
|
|
|
};
|
2019-09-28 17:07:53 +01:00
|
|
|
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
|
2019-10-02 20:19:01 +01:00
|
|
|
${imagemagick}/bin/convert ${appimageContents}/ledger-live-desktop.png -resize 512x512 ledger-live-desktop_512.png
|
|
|
|
install -m 444 -D ledger-live-desktop_512.png $out/share/icons/hicolor/512x512/apps/ledger-live-desktop.png
|
2019-09-28 17:07:53 +01:00
|
|
|
substituteInPlace $out/share/applications/ledger-live-desktop.desktop \
|
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
2019-08-04 10:37:12 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-08-04 10:37:12 +01:00
|
|
|
description = "Wallet app for Ledger Nano S and Ledger Blue";
|
|
|
|
homepage = "https://www.ledger.com/live";
|
|
|
|
license = licenses.mit;
|
2020-11-28 13:36:07 +00:00
|
|
|
maintainers = with maintainers; [ thedavidmeister nyanloutre RaghavSood th0rgal ];
|
2019-08-04 10:37:12 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|