2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
SDL2,
|
|
|
|
SDL2_net,
|
|
|
|
alsa-lib,
|
|
|
|
fetchurl,
|
|
|
|
flac,
|
|
|
|
freeglut,
|
|
|
|
libGL,
|
|
|
|
libGLU,
|
|
|
|
libX11,
|
|
|
|
libcdio,
|
|
|
|
libiconv,
|
|
|
|
libjack2,
|
|
|
|
libsamplerate,
|
|
|
|
libsndfile,
|
|
|
|
pkg-config,
|
|
|
|
stdenv,
|
|
|
|
zlib,
|
2022-02-20 05:27:41 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "mednafen";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "1.29.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-04-21 15:54:59 +00:00
|
|
|
url = "https://mednafen.github.io/releases/files/mednafen-${finalAttrs.version}.tar.xz";
|
2022-02-20 05:27:41 +00:00
|
|
|
hash = "sha256-2j+88Ch3+b4PAov6XRy1npU6QEm5D+fjk4ijOG2fNi4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
SDL2
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
SDL2
|
|
|
|
SDL2_net
|
|
|
|
flac
|
2020-04-24 23:36:52 +00:00
|
|
|
freeglut
|
|
|
|
libcdio
|
|
|
|
libjack2
|
|
|
|
libsamplerate
|
|
|
|
libsndfile
|
|
|
|
zlib
|
2022-03-05 16:20:37 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
alsa-lib
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libX11
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
libiconv
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
hardeningDisable = [
|
|
|
|
"format"
|
|
|
|
"pic"
|
|
|
|
];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
mkdir -p $doc/share/doc
|
|
|
|
mv Documentation $doc/share/doc/mednafen
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
meta = {
|
2022-02-20 05:27:41 +00:00
|
|
|
homepage = "https://mednafen.github.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A portable, CLI-driven, SDL+OpenGL-based, multi-system emulator";
|
|
|
|
longDescription = ''
|
|
|
|
Mednafen is a portable, utilizing OpenGL and SDL,
|
|
|
|
argument(command-line)-driven multi-system emulator. Mednafen has the
|
|
|
|
ability to remap hotkey functions and virtual system inputs to a keyboard,
|
|
|
|
a joystick, or both simultaneously. Save states are supported, as is
|
|
|
|
real-time game rewinding. Screen snapshots may be taken, in the PNG file
|
|
|
|
format, at the press of a button. Mednafen can record audiovisual movies
|
|
|
|
in the QuickTime file format, with several different lossless codecs
|
|
|
|
supported.
|
|
|
|
|
|
|
|
The following systems are supported (refer to the emulation module
|
|
|
|
documentation for more details):
|
|
|
|
|
|
|
|
- Apple II/II+
|
|
|
|
- Atari Lynx
|
|
|
|
- Neo Geo Pocket (Color)
|
|
|
|
- WonderSwan
|
|
|
|
- GameBoy (Color)
|
|
|
|
- GameBoy Advance
|
|
|
|
- Nintendo Entertainment System
|
|
|
|
- Super Nintendo Entertainment System/Super Famicom
|
|
|
|
- Virtual Boy
|
|
|
|
- PC Engine/TurboGrafx 16 (CD)
|
|
|
|
- SuperGrafx
|
|
|
|
- PC-FX
|
|
|
|
- Sega Game Gear
|
|
|
|
- Sega Genesis/Megadrive
|
|
|
|
- Sega Master System
|
|
|
|
- Sega Saturn (experimental, x86_64 only)
|
|
|
|
- Sony PlayStation
|
|
|
|
'';
|
2024-04-21 15:54:59 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "mednafen";
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
})
|