Skip to content

Commit

Permalink
ruffle: add postInstall phase for desktop files on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
normalcea committed Jan 13, 2025
1 parent 268c2f7 commit 5ba6581
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/by-name/ru/ruffle/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ rustPlatform.buildRustPackage {

dontWrapGApps = true;

postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
install -Dm644 -t $out/share/icons/hicolor/scalable/apps/ desktop/packages/linux/rs.ruffle.Ruffle.svg
install -Dm644 -t $out/share/applications/ desktop/packages/linux/rs.ruffle.Ruffle.desktop
substituteInPlace $out/share/applications/rs.ruffle.Ruffle.desktop \
--replace-fail "Exec=ruffle %u" "Exec=ruffle_desktop %u"
install -Dm644 -t $out/share/metainfo/ desktop/packages/linux/rs.ruffle.Ruffle.metainfo.xml
'';

preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf $out/bin/ruffle_desktop \
--add-needed libxkbcommon-x11.so \
Expand Down

0 comments on commit 5ba6581

Please sign in to comment.