Merge pull request #164984 from svanderburg/vice-desktopitems

vice: add desktop items for all computer model emulators
This commit is contained in:
Sander van der Burg 2022-03-20 20:43:34 +01:00 committed by GitHub
commit 276ee7bba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,108 @@
, file , file
}: }:
let
desktopItems = [
(makeDesktopItem {
name = "x128";
exec = "x128";
comment = "VICE: C128 Emulator";
desktopName = "VICE: C128 Emulator";
genericName = "Commodore 128 emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "x64";
exec = "x64";
comment = "VICE: C64 Emulator";
desktopName = "VICE: C64 Emulator";
genericName = "Commodore 64 emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "x64dtv";
exec = "x64dtv";
comment = "VICE: C64 DTV Emulator";
desktopName = "VICE: C64 DTV Emulator";
genericName = "Commodore 64 DTV emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "x64sc";
exec = "x64sc";
comment = "VICE: C64 SC Emulator";
desktopName = "VICE: C64 SC Emulator";
genericName = "Commodore 64 SC emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xcbm2";
exec = "xcbm2";
comment = "VICE: CBM-II B-Model Emulator";
desktopName = "VICE: CBM-II B-Model Emulator";
genericName = "CBM-II B-Model Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xcbm5x0";
exec = "xcbm5x0";
comment = "VICE: CBM-II P-Model Emulator";
desktopName = "VICE: CBM-II P-Model Emulator";
genericName = "CBM-II P-Model Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xpet";
exec = "xpet";
comment = "VICE: PET Emulator";
desktopName = "VICE: PET Emulator";
genericName = "Commodore PET Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xplus4";
exec = "xplus4";
comment = "VICE: PLUS4 Emulator";
desktopName = "VICE: PLUS4 Emulator";
genericName = "Commodore PLUS4 Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xscpu64";
exec = "xscpu64";
comment = "VICE: SCPU64 Emulator";
desktopName = "VICE: SCPU64 Emulator";
genericName = "Commodore SCPU64 Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "xvic";
exec = "xvic";
comment = "VICE: VIC-20 Emulator";
desktopName = "VICE: VIC-20 Emulator";
genericName = "Commodore VIC-20 Emulator";
categories = [ "System" ];
})
(makeDesktopItem {
name = "vsid";
exec = "vsid";
comment = "VSID: The SID Emulator";
desktopName = "VSID: The SID Emulator";
genericName = "SID Emulator";
categories = [ "System" ];
})
];
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "vice"; pname = "vice";
version = "3.6.1"; version = "3.6.1";
@ -59,15 +161,6 @@ stdenv.mkDerivation rec {
dontDisableStatic = true; dontDisableStatic = true;
configureFlags = [ "--enable-fullscreen" "--enable-gnomeui" "--disable-pdf-docs" ]; configureFlags = [ "--enable-fullscreen" "--enable-gnomeui" "--disable-pdf-docs" ];
desktopItem = makeDesktopItem {
name = "vice";
exec = "x64";
comment = "Commodore 64 emulator";
desktopName = "VICE";
genericName = "Commodore 64 emulator";
categories = [ "Emulator" ];
};
preBuild = '' preBuild = ''
for i in src/resid src/resid-dtv for i in src/resid src/resid-dtv
do do
@ -77,12 +170,15 @@ stdenv.mkDerivation rec {
''; '';
postInstall = '' postInstall = ''
mkdir -p $out/share/applications for app in ${toString desktopItems}
cp ${desktopItem}/share/applications/* $out/share/applications do
mkdir -p $out/share/applications
cp $app/share/applications/* $out/share/applications
done
''; '';
meta = { meta = {
description = "Commodore 64, 128 and other emulators"; description = "Emulators for a variety of 8-bit Commodore computers";
homepage = "https://vice-emu.sourceforge.io/"; homepage = "https://vice-emu.sourceforge.io/";
license = lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.sander ]; maintainers = [ lib.maintainers.sander ];