Add icon to steam rom manager.

This commit is contained in:
Tom Alexander 2025-02-15 10:05:59 -05:00
parent 02223deb64
commit 5859a06c5d
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -7,6 +7,10 @@
let
version = "2.5.29";
icon = pkgs.fetchurl {
url = "https://github.com/SteamGridDB/steam-rom-manager/blob/master/src/assets/icons/512x512.png?raw=true";
hash = "sha256-Nx29nJ2+44AYrTLP+CNmDJFAf2sjrH7sfYhg9fJx2qo=";
};
in
stdenv.mkDerivation {
name = "steam-rom-manager";
@ -23,9 +27,11 @@ stdenv.mkDerivation {
install --mode=0755 $src $out/bin/steam-rom-manager
runHook postInstall
'';
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
postInstall = ''
mkdir -p $out/share/applications
install -m 444 -D "$desktopItem/share/applications/"* -t $out/share/applications/
mkdir -p $out/share/{applications,pixmaps}
install -m 555 -D "$desktopItem/share/applications/"* -t $out/share/applications/
install -m 444 -D "${icon}" $out/share/pixmaps/steamrommanager.png
'';
desktopItem = makeDesktopItem {
@ -36,7 +42,7 @@ stdenv.mkDerivation {
"Application"
"Utility"
];
icon = "steam-rom-manager";
icon = "steamrommanager";
type = "Application";
exec = "steam-rom-manager";
};