From df2b8f45c318c686362b08fb04eb40e716552cf7 Mon Sep 17 00:00:00 2001 From: rucadi Date: Sat, 14 Jun 2025 14:04:22 +0200 Subject: [PATCH] ukmm: add desktop file --- pkgs/by-name/uk/ukmm/package.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/by-name/uk/ukmm/package.nix b/pkgs/by-name/uk/ukmm/package.nix index df12bb0bcaf5..afcc6fcfa9dc 100644 --- a/pkgs/by-name/uk/ukmm/package.nix +++ b/pkgs/by-name/uk/ukmm/package.nix @@ -9,6 +9,8 @@ libglvnd, libxkbcommon, openssl, + makeDesktopItem, + copyDesktopItems, nix-update-script, }: @@ -30,6 +32,7 @@ rustPlatform.buildRustPackage (finalAttrs: { cmake pkg-config wrapGAppsHook3 + copyDesktopItems ]; buildInputs = [ @@ -70,6 +73,25 @@ rustPlatform.buildRustPackage (finalAttrs: { passthru.updateScript = nix-update-script { }; + postInstall = '' + install -Dm444 assets/ukmm.png $out/share/icons/hicolor/256x256/apps/ukmm.png + ''; + + desktopItems = [ + (makeDesktopItem { + name = "ukmm"; + exec = "ukmm %u"; + mimeTypes = [ "x-scheme-handler/bcml" ]; + icon = "ukmm"; + desktopName = "UKMM"; + categories = [ + "Game" + "Utility" + ]; + comment = "Breath of the Wild Mod Manager"; + }) + ]; + meta = with lib; { description = "New mod manager for The Legend of Zelda: Breath of the Wild"; homepage = "https://github.com/NiceneNerd/ukmm";