retrospy: fix icon resolution (#311127)

This commit is contained in:
Naxdy 2024-05-13 10:59:23 +02:00 committed by GitHub
parent f46f95fb3e
commit d60ffedd11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,21 +9,11 @@
, libXcursor
, libICE
, libSM
, runCommandLocal
}:
let
version = "6.4.8";
executables = [
"RetroSpy"
"GBPemu"
"GBPUpdater"
"UsbUpdater"
];
in
buildDotnetModule {
pname = "retrospy";
inherit version;
src = fetchFromGitHub {
owner = "retrospy";
repo = "RetroSpy";
@ -31,6 +21,24 @@ buildDotnetModule {
hash = "sha256-0rdLdud78gnBX8CIdG81caJ1IRoIjGzb7coP4huEPDA=";
};
executables = [
"RetroSpy"
"GBPemu"
"GBPUpdater"
"UsbUpdater"
];
retrospy-icons = runCommandLocal "retrospy-icons" { } ''
mkdir -p $out/share/retrospy
${builtins.concatStringsSep "\n" (map (e: "cp ${src}/${e}.ico $out/share/retrospy/${e}.ico") executables)}
'';
in
buildDotnetModule {
pname = "retrospy";
inherit version;
inherit src;
nativeBuildInputs = [
copyDesktopItems
];
@ -57,18 +65,13 @@ buildDotnetModule {
inherit executables;
postInstall = ''
mkdir -p $out/share/retrospy
${builtins.concatStringsSep "\n" (map (e: "cp ./${e}.ico $out/share/retrospy/${e}.ico") executables)}
'';
passthru.updateScript = ./update.sh;
desktopItems = map
(e: (makeDesktopItem {
name = e;
exec = e;
icon = "${placeholder "out"}/share/retrospy/${e}.ico";
icon = "${retrospy-icons}/share/retrospy/${e}.ico";
desktopName = "${e}";
categories = [ "Utility" ];
startupWMClass = e;