Merge pull request #287462 from MangoIV/mangoiv/default-exe-cider

cider: set `meta.mainProgram` and `ozone` platform hints
This commit is contained in:
Rick van Schijndel 2024-04-09 05:37:42 +02:00 committed by GitHub
commit 502adc403a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
{ appimageTools, lib, fetchurl }: { appimageTools, lib, fetchurl, makeWrapper}:
appimageTools.wrapType2 rec { appimageTools.wrapType2 rec {
pname = "cider"; pname = "cider";
@ -14,9 +14,13 @@ appimageTools.wrapType2 rec {
in '' in ''
mv $out/bin/${pname}-${version} $out/bin/${pname} mv $out/bin/${pname}-${version} $out/bin/${pname}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \ substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}' --replace-warn 'Exec=AppRun' 'Exec=${pname}'
cp -r ${contents}/usr/share/icons $out/share cp -r ${contents}/usr/share/icons $out/share
''; '';
@ -24,8 +28,8 @@ appimageTools.wrapType2 rec {
description = "A new look into listening and enjoying Apple Music in style and performance."; description = "A new look into listening and enjoying Apple Music in style and performance.";
homepage = "https://github.com/ciderapp/Cider"; homepage = "https://github.com/ciderapp/Cider";
license = licenses.agpl3Only; license = licenses.agpl3Only;
mainProgram = "cider";
maintainers = [ maintainers.cigrainger ]; maintainers = [ maintainers.cigrainger ];
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
mainProgram = "cider";
}; };
} }