amiberry: create desktop file (#344719)

This commit is contained in:
Pol Dellaiera 2024-09-27 01:18:52 +02:00 committed by GitHub
commit 5a9892ff54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,7 @@
stdenv,
fetchFromGitHub,
cmake,
copyDesktopItems,
makeWrapper,
flac,
libmpeg2,
@ -13,6 +14,7 @@
SDL2,
SDL2_image,
SDL2_ttf,
makeDesktopItem,
}:
stdenv.mkDerivation (finalAttrs: {
@ -28,6 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
copyDesktopItems
makeWrapper
];
@ -61,6 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
mkdir -p $out/bin
cp amiberry $out/bin/
cp -r abr data $out/
install -Dm444 data/amiberry.png $out/share/icons/hicolor/256x256/apps/amiberry.png
wrapProgram $out/bin/amiberry \
--set-default AMIBERRY_DATA_DIR $out \
--run 'AMIBERRY_HOME_DIR="$HOME/.amiberry"' \
@ -80,6 +84,20 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "amiberry";
desktopName = "Amiberry";
exec = "amiberry";
comment = "Amiga emulator";
icon = "amiberry";
categories = [
"System"
"Emulator"
];
})
];
meta = with lib; {
homepage = "https://github.com/BlitterStudio/amiberry";
description = "Optimized Amiga emulator for Linux/macOS";