nixpkgs/pkgs/applications/emulators/vice/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

188 lines
4.0 KiB
Nix
Raw Normal View History

2021-12-05 22:47:34 +00:00
{ lib
, stdenv
, fetchurl
, bison
, flex
, perl
, libpng
, giflib
, libjpeg
, alsa-lib
, readline
, libGLU
, libGL
, libXaw
, pkg-config
, gtk2
, SDL
, SDL_image
, autoreconfHook
, makeDesktopItem
, dos2unix
, xa
, 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 {
2021-08-12 21:00:21 +00:00
pname = "vice";
2022-01-26 18:35:38 +00:00
version = "3.6.1";
src = fetchurl {
2021-08-12 21:00:21 +00:00
url = "mirror://sourceforge/vice-emu/vice-${version}.tar.gz";
2022-01-26 18:35:38 +00:00
sha256 = "sha256-IN+EyFGq8vUABRCSf20xsy8mmRbTUUZcNm3Ar8ncFQw=";
};
2021-12-05 22:47:34 +00:00
nativeBuildInputs = [
autoreconfHook
bison
dos2unix
file
flex
pkg-config
];
buildInputs = [
alsa-lib
giflib
gtk2
libGL
libGLU
libXaw
libjpeg
libpng
perl
readline
SDL
SDL_image
xa
];
2017-09-10 13:37:26 +00:00
dontDisableStatic = true;
2021-12-05 22:47:34 +00:00
configureFlags = [ "--enable-fullscreen" "--enable-gnomeui" "--disable-pdf-docs" ];
2017-09-10 13:37:26 +00:00
preBuild = ''
for i in src/resid src/resid-dtv
do
2021-12-05 22:47:34 +00:00
mkdir -pv $i/src
ln -sv ../../wrap-u-ar.sh $i/src
2017-09-10 13:37:26 +00:00
done
'';
postInstall = ''
for app in ${toString desktopItems}
do
mkdir -p $out/share/applications
cp $app/share/applications/* $out/share/applications
done
'';
meta = {
description = "Emulators for a variety of 8-bit Commodore computers";
2021-12-05 22:47:34 +00:00
homepage = "https://vice-emu.sourceforge.io/";
2021-01-15 13:21:58 +00:00
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.sander ];
platforms = lib.platforms.linux;
};
}