2024-05-15 15:35:15 +00:00
|
|
|
{ lib, fetchurl, appimageTools, makeWrapper, imagemagick }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "ledger-live-desktop";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.79.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-06-26 10:26:21 +00:00
|
|
|
url = "https://download.live.ledger.com/${pname}-${version}-linux-x86_64.AppImage";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-zgs4uIK73CBp4hTbuO8LdcgvmUN3hYsnv61E+WGlpjg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
appimageContents = appimageTools.extractType2 {
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit pname version src;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-10-01 09:20:50 +00:00
|
|
|
in
|
|
|
|
appimageTools.wrapType2 rec {
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit pname version src;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
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
|
|
|
|
${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
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
source "${makeWrapper}/nix-support/setup-hook"
|
|
|
|
wrapProgram "$out/bin/${pname}" \
|
|
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations --enable-wayland-ime}}"
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace $out/share/applications/ledger-live-desktop.desktop \
|
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-03-04 12:14:45 +00:00
|
|
|
description = "App for Ledger hardware wallets";
|
|
|
|
homepage = "https://www.ledger.com/ledger-live/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ andresilva thedavidmeister nyanloutre RaghavSood th0rgal ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "ledger-live-desktop";
|
2024-02-07 01:22:34 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|