From 4c077b5865b5cddfa83d0079dc510613f5a73def Mon Sep 17 00:00:00 2001 From: Gliczy <129636582+Gliczy@users.noreply.github.com> Date: Sun, 3 Nov 2024 23:44:07 +0100 Subject: [PATCH] simple64: add missing desktop file --- pkgs/by-name/si/simple64/package.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/by-name/si/simple64/package.nix b/pkgs/by-name/si/simple64/package.nix index 4c00f6b806ddd6..ae7a046538811d 100644 --- a/pkgs/by-name/si/simple64/package.nix +++ b/pkgs/by-name/si/simple64/package.nix @@ -15,6 +15,8 @@ hidapi, qt6, vulkan-loader, + makeDesktopItem, + copyDesktopItems, }: let @@ -51,6 +53,7 @@ stdenv.mkDerivation (finalAttrs: { ninja pkg-config makeWrapper + copyDesktopItems # fake git command for version info generator (writeShellScriptBin "git" "echo ${finalAttrs.src.rev}") ]; @@ -84,6 +87,9 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p $out/share/simple64 $out/bin cp -r simple64/* $out/share/simple64 + mkdir -p $out/share/icons/hicolor/scalable/apps + install -Dm644 ./simple64-gui/icons/simple64.svg $out/share/icons/hicolor/scalable/apps/ + makeWrapper $out/share/simple64/simple64-gui $out/bin/simple64-gui \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]} \ "''${qtWrapperArgs[@]}" @@ -91,6 +97,22 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; + desktopItems = [ + (makeDesktopItem { + name = "simple64"; + desktopName = "simple64"; + genericName = "Nintendo 64 Emulator"; + exec = "simple64-gui"; + mimeTypes = [ "application/x-n64-rom" ]; + icon = "simple64"; + terminal = false; + categories = [ + "Game" + "Emulator" + ]; + }) + ]; + meta = { description = "Easy to use N64 emulator"; homepage = "https://simple64.github.io";