From 4f0a3e797d035f88279001d17f02c79c57a45472 Mon Sep 17 00:00:00 2001 From: normalc Date: Sat, 4 Jan 2025 19:11:40 -0500 Subject: [PATCH] ruffle: add postInstall phase for desktop files on Linux --- pkgs/by-name/ru/ruffle/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ru/ruffle/package.nix b/pkgs/by-name/ru/ruffle/package.nix index 87de643b04fc2..5ac9463f03445 100644 --- a/pkgs/by-name/ru/ruffle/package.nix +++ b/pkgs/by-name/ru/ruffle/package.nix @@ -66,6 +66,12 @@ 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 + 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 \