unciv: install icon for desktop item

This commit is contained in:
h7x4 2024-06-12 23:32:04 +02:00
parent e51e07e4be
commit 53961c0aa6
No known key found for this signature in database
GPG Key ID: 9F2F7D8250F35146

View File

@ -15,9 +15,15 @@ let
exec = "unciv";
comment = "An open-source Android/Desktop remake of Civ V";
desktopName = "Unciv";
icon = "unciv";
categories = [ "Game" ];
};
desktopIcon = fetchurl {
url = "https://github.com/yairm210/Unciv/blob/4.11.16/extraImages/Icons/Unciv%20icon%20v6.png?raw=true";
hash = "sha256-Zuz+HGfxjGviGBKTiHdIFXF8UMRLEIfM8f+LIB/xonk=";
};
envLibPath = lib.makeLibraryPath (lib.optionals stdenv.isLinux [
libGL
libpulseaudio
@ -46,6 +52,8 @@ stdenv.mkDerivation rec {
--prefix PATH : ${lib.makeBinPath [ jre ]} \
--add-flags "-jar ${src}"
install -Dm444 ${desktopIcon} $out/share/icons/hicolor/512x512/apps/unciv.png
runHook postInstall
'';