From fa19de9a8f39ad5babd862cc84e2782477b27744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Tue, 7 May 2024 11:30:02 +0100 Subject: [PATCH] ledger-live-desktop: support NIXOS_OZONE_WL Co-authored-by: seth --- .../blockchains/ledger-live-desktop/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/blockchains/ledger-live-desktop/default.nix b/pkgs/applications/blockchains/ledger-live-desktop/default.nix index 24ba95df584f..e995804fade7 100644 --- a/pkgs/applications/blockchains/ledger-live-desktop/default.nix +++ b/pkgs/applications/blockchains/ledger-live-desktop/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, appimageTools, imagemagick }: +{ lib, fetchurl, appimageTools, makeWrapper, imagemagick }: let pname = "ledger-live-desktop"; @@ -22,6 +22,10 @@ appimageTools.wrapType2 rec { ${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 + 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}}" + substituteInPlace $out/share/applications/ledger-live-desktop.desktop \ --replace 'Exec=AppRun' 'Exec=${pname}' '';