From 60358cdd9e83d49d4f9f34b2e239bfcaa3d5297b Mon Sep 17 00:00:00 2001 From: David Meister Date: Sun, 4 Aug 2019 19:37:12 +1000 Subject: [PATCH] ledger-live-desktop: init at 1.12.0 (#62753) --- .../altcoins/ledger-live-desktop/default.nix | 50 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/applications/altcoins/ledger-live-desktop/default.nix diff --git a/pkgs/applications/altcoins/ledger-live-desktop/default.nix b/pkgs/applications/altcoins/ledger-live-desktop/default.nix new file mode 100644 index 000000000000..0417d2913de5 --- /dev/null +++ b/pkgs/applications/altcoins/ledger-live-desktop/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchurl, makeDesktopItem, makeWrapper, appimage-run }: + +stdenv.mkDerivation rec { + pname = "ledger-live-desktop"; + version = "1.12.0"; + + src = fetchurl { + url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage"; + sha256 = "0sn0ri8kqvy36d6vjwsb0mh54nwic58416m6q5drl1schsn6wyvj"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ appimage-run ]; + + desktopIcon = fetchurl { + url = "https://raw.githubusercontent.com/LedgerHQ/${pname}/v${version}/build/icon.png"; + sha256 = "1mmfaf0yk7xf1kgbs3ka8wsbz1qgh60xj6z91ica1i7lw2qbdd5h"; + }; + + desktopItem = makeDesktopItem { + name = pname; + exec = "${placeholder "out"}/bin/${pname}"; + icon = pname; + desktopName = "Ledger Live"; + categories = "Utility;"; + }; + + unpackPhase = ":"; + + installPhase = '' + runHook preInstall + + ${desktopItem.buildCommand} + install -D $src $out/share/${src.name} + install -Dm -x ${desktopIcon} \ + $out/share/icons/hicolor/1024x1024/apps/${pname}.png + makeWrapper ${appimage-run}/bin/appimage-run $out/bin/${pname} \ + --add-flags $out/share/${src.name} + + runHook postInstall + ''; + + 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 ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 98004a6ce8cb..09d7c8f91de3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4387,6 +4387,8 @@ in leatherman = callPackage ../development/libraries/leatherman { }; + ledger-live-desktop = callPackage ../applications/altcoins/ledger-live-desktop { }; + ledmon = callPackage ../tools/system/ledmon { }; leela = callPackage ../tools/graphics/leela { };