push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,120 @@
{
lib,
stdenv,
fetchFromGitHub,
gitUpdater,
cmake,
python3,
withDynarec ? (
stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isRiscV64 || stdenv.hostPlatform.isLoongArch64
),
runCommand,
hello-x86_64,
}:
# Currently only supported on specific archs
assert
withDynarec
-> (
stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isRiscV64 || stdenv.hostPlatform.isLoongArch64
);
stdenv.mkDerivation (finalAttrs: {
pname = "box64";
version = "0.3.6";
src = fetchFromGitHub {
owner = "ptitSeb";
repo = "box64";
rev = "v${finalAttrs.version}";
hash = "sha256-Z8r7aonVj7VSifgLKx/L7VRdGNnQtTvS4mjI+2+uPxY=";
};
# Setting cpu doesn't seem to work (or maybe isn't enough / gets overwritten by the wrapper's arch flag?), errors about unsupported instructions for target
# (this is for code that gets executed conditionally if the cpu at runtime supports their features, so setting this should be fine)
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail 'ASMFLAGS -pipe -mcpu=cortex-a76' 'ASMFLAGS -pipe -march=armv8.2-a+fp16+dotprod'
'';
nativeBuildInputs = [
cmake
python3
];
cmakeFlags = [
(lib.cmakeBool "NOGIT" true)
# Arch mega-option
(lib.cmakeBool "ARM64" stdenv.hostPlatform.isAarch64)
(lib.cmakeBool "RV64" stdenv.hostPlatform.isRiscV64)
(lib.cmakeBool "PPC64LE" (stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian))
(lib.cmakeBool "LARCH64" stdenv.hostPlatform.isLoongArch64)
]
++ lib.optionals stdenv.hostPlatform.isx86_64 [
# x86_64 has no arch-specific mega-option, manually enable the options that apply to it
(lib.cmakeBool "LD80BITS" true)
(lib.cmakeBool "NOALIGN" true)
]
++ [
# Arch dynarec
(lib.cmakeBool "ARM_DYNAREC" (withDynarec && stdenv.hostPlatform.isAarch64))
(lib.cmakeBool "RV64_DYNAREC" (withDynarec && stdenv.hostPlatform.isRiscV64))
(lib.cmakeBool "LARCH64_DYNAREC" (withDynarec && stdenv.hostPlatform.isLoongArch64))
];
installPhase = ''
runHook preInstall
install -Dm 0755 box64 "$out/bin/box64"
runHook postInstall
'';
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
installCheckPhase = ''
runHook preInstallCheck
echo Checking if it works
$out/bin/box64 -v
echo Checking if Dynarec option was respected
$out/bin/box64 -v | grep ${lib.optionalString (!withDynarec) "-v"} Dynarec
runHook postInstallCheck
'';
passthru = {
updateScript = gitUpdater { rev-prefix = "v"; };
tests.hello =
runCommand "box64-test-hello" { nativeBuildInputs = [ finalAttrs.finalPackage ]; }
# There is no actual "Hello, world!" with any of the logging enabled, and with all logging disabled it's hard to
# tell what problems the emulator has run into.
''
BOX64_NOBANNER=0 BOX64_LOG=1 box64 ${lib.getExe hello-x86_64} --version | tee $out
'';
};
meta = {
homepage = "https://box86.org/";
description = "Lets you run x86_64 Linux programs on non-x86_64 Linux systems";
changelog = "https://github.com/ptitSeb/box64/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
gador
OPNA2608
];
mainProgram = "box64";
platforms = [
"x86_64-linux"
"aarch64-linux"
"riscv64-linux"
"powerpc64le-linux"
"loongarch64-linux"
"mips64el-linux"
];
};
})

View File

@@ -0,0 +1,102 @@
{
buildPackages,
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
withDynarec ? stdenv.hostPlatform.isAarch32,
runCommand,
hello-x86_32,
}:
# Currently only supported on specific archs
assert withDynarec -> stdenv.hostPlatform.isAarch32;
stdenv.mkDerivation (finalAttrs: {
pname = "box86";
version = "0.3.8";
src = fetchFromGitHub {
owner = "ptitSeb";
repo = "box86";
rev = "v${finalAttrs.version}";
hash = "sha256-/xeyb4NK5ZzPevlAjjSnc6JAmsmqnx3slaMfPLL9dYI=";
};
nativeBuildInputs = [
cmake
python3
];
cmakeFlags = [
(lib.cmakeBool "NOGIT" true)
# Arch mega-option
(lib.cmakeBool "POWERPCLE" (stdenv.hostPlatform.isPower && stdenv.hostPlatform.isLittleEndian))
]
++ lib.optionals stdenv.hostPlatform.isi686 [
# x86 has no arch-specific mega-option, manually enable the options that apply to it
(lib.cmakeBool "LD80BITS" true)
(lib.cmakeBool "NOALIGN" true)
]
++ [
# Arch dynarec
(lib.cmakeBool "ARM_DYNAREC" (withDynarec && stdenv.hostPlatform.isAarch))
];
installPhase = ''
runHook preInstall
install -Dm 0755 box86 "$out/bin/box86"
runHook postInstall
'';
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
installCheckPhase = ''
runHook preInstallCheck
echo Checking if it works
$out/bin/box86 -v
echo Checking if Dynarec option was respected
$out/bin/box86 -v | grep ${lib.optionalString (!withDynarec) "-v"} Dynarec
runHook postInstallCheck
'';
passthru = {
# gitUpdater for local system, otherwise we're cross-compiling gitUpdater
updateScript = buildPackages.gitUpdater { rev-prefix = "v"; };
tests.hello =
runCommand "box86-test-hello" { nativeBuildInputs = [ finalAttrs.finalPackage ]; }
# There is no actual "Hello, world!" with any of the logging enabled, and with all logging disabled it's hard to
# tell what problems the emulator has run into.
''
BOX86_NOBANNER=0 BOX86_LOG=1 box86 ${lib.getExe hello-x86_32} --version | tee $out
'';
};
meta = {
homepage = "https://box86.org/";
description = "Lets you run x86 Linux programs on non-x86 Linux systems";
changelog = "https://github.com/ptitSeb/box86/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
gador
OPNA2608
];
mainProgram = "box86";
platforms = [
"i686-linux"
"armv7l-linux"
"powerpcle-linux"
"loongarch64-linux"
"mipsel-linux"
];
};
})

View File

@@ -0,0 +1,54 @@
{
cmake,
pkg-config,
callPackage,
gobject-introspection,
wrapGAppsHook3,
python3Packages,
libxml2,
gnuplot,
adwaita-icon-theme,
gdk-pixbuf,
intltool,
libmirage,
}:
python3Packages.buildPythonApplication {
inherit
(callPackage ./common-drv-attrs.nix {
version = "3.2.6";
pname = "image-analyzer";
hash = "sha256-7I8RUgd+k3cEzskJGbziv1f0/eo5QQXn62wGh/Y5ozc=";
})
pname
version
src
meta
;
buildInputs = [
libxml2
gnuplot
libmirage
adwaita-icon-theme
gdk-pixbuf
];
propagatedBuildInputs = with python3Packages; [
pygobject3
matplotlib
];
nativeBuildInputs = [
cmake
pkg-config
wrapGAppsHook3
intltool
gobject-introspection
];
pyproject = false;
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
}

View File

@@ -0,0 +1,42 @@
{
callPackage,
python3Packages,
cmake,
pkg-config,
intltool,
wrapGAppsNoGuiHook,
gobject-introspection,
}:
python3Packages.buildPythonApplication {
inherit
(callPackage ./common-drv-attrs.nix {
version = "3.2.5";
pname = "cdemu-client";
hash = "sha256-py2F61v8vO0BCM18GCflAiD48deZjbMM6wqoCDZsOd8=";
})
pname
version
src
meta
;
nativeBuildInputs = [
cmake
pkg-config
intltool
wrapGAppsNoGuiHook
gobject-introspection
];
propagatedBuildInputs = with python3Packages; [
dbus-python
pygobject3
];
pyproject = false;
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
}

View File

@@ -0,0 +1,33 @@
{
lib,
fetchurl,
pname,
version,
hash,
}:
{
inherit pname version;
src = fetchurl {
url = "mirror://sourceforge/cdemu/${pname}-${version}.tar.xz";
inherit hash;
};
meta = with lib; {
description = "Suite of tools for emulating optical drives and discs";
longDescription = ''
CDEmu consists of:
- a kernel module implementing a virtual drive-controller
- libmirage which is a software library for interpreting optical disc images
- a daemon which emulates the functionality of an optical drive+disc
- textmode and GTK clients for controlling the emulator
- an image analyzer to view the structure of image files
Optical media emulated by CDemu can be mounted within Linux. Automounting is also allowed.
'';
homepage = "https://cdemu.sourceforge.io/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with lib.maintainers; [ bendlas ];
};
}

View File

@@ -0,0 +1,59 @@
{
stdenv,
callPackage,
cmake,
pkg-config,
glib,
libao,
intltool,
libmirage,
coreutils,
}:
let
inherit
(callPackage ./common-drv-attrs.nix {
version = "3.2.7";
pname = "cdemu-daemon";
hash = "sha256-EKh2G6RA9Yq46BpTAqN2s6TpLJb8gwDuEpGiwdGcelc=";
})
pname
version
src
meta
;
in
stdenv.mkDerivation {
inherit pname version src;
nativeBuildInputs = [
cmake
pkg-config
intltool
];
buildInputs = [
glib
libao
libmirage
];
postInstall = ''
mkdir -p $out/share/dbus-1/services
cp -R ../service-example $out/share/cdemu
substitute \
$out/share/cdemu/net.sf.cdemu.CDEmuDaemon.service \
$out/share/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service \
--replace /bin/true ${coreutils}/bin/true
'';
meta = {
inherit (meta)
description
license
longDescription
maintainers
platforms
;
homepage = "https://cdemu.sourceforge.io/about/daemon/";
mainProgram = "cdemu-daemon";
};
}

View File

@@ -0,0 +1,49 @@
{
callPackage,
cmake,
pkg-config,
wrapGAppsHook3,
gobject-introspection,
python3Packages,
libnotify,
intltool,
adwaita-icon-theme,
gdk-pixbuf,
libappindicator-gtk3,
}:
python3Packages.buildPythonApplication {
inherit
(callPackage ./common-drv-attrs.nix {
version = "3.2.6";
pname = "gcdemu";
hash = "sha256-w4vzKoSotL5Cjfr4Cu4YhNSWXJqS+n/vySrwvbhR1zA=";
})
pname
version
src
meta
;
nativeBuildInputs = [
cmake
pkg-config
wrapGAppsHook3
intltool
gobject-introspection
];
buildInputs = [
libnotify
adwaita-icon-theme
gdk-pixbuf
libappindicator-gtk3
];
propagatedBuildInputs = with python3Packages; [ pygobject3 ];
pyproject = false;
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
}

View File

@@ -0,0 +1,70 @@
{
stdenv,
callPackage,
cmake,
pkg-config,
gobject-introspection,
vala,
glib,
libsndfile,
zlib,
bzip2,
xz,
libsamplerate,
intltool,
pcre,
util-linux,
libselinux,
libsepol,
}:
let
inherit
(callPackage ./common-drv-attrs.nix {
version = "3.2.10";
pname = "libmirage";
hash = "sha256-+T5Gu3VcprCkSJcq/kTySRnNI7nc+GbRtctLkzPhgK4=";
})
pname
version
src
meta
;
in
stdenv.mkDerivation {
inherit pname version src;
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
buildInputs = [
glib
libsndfile
zlib
bzip2
xz
libsamplerate
];
nativeBuildInputs = [
cmake
pkg-config
intltool
gobject-introspection
vala
];
propagatedBuildInputs = [
pcre
util-linux
libselinux
libsepol
];
meta = {
inherit (meta)
maintainers
license
platforms
;
description = "CD-ROM image access library";
homepage = "https://cdemu.sourceforge.io/about/libmirage/";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
kernel,
kernelModuleMakeFlags,
}:
stdenv.mkDerivation rec {
pname = "vhba";
version = "20250329";
src = fetchurl {
url = "mirror://sourceforge/cdemu/vhba-module-${version}.tar.xz";
hash = "sha256-piog1yDd8M/lpTIo9FE9SY2JwurZ6a8LG2lZ/4EmB14=";
};
makeFlags = kernelModuleMakeFlags ++ [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"INSTALL_MOD_PATH=$(out)"
];
nativeBuildInputs = kernel.moduleBuildDependencies;
meta = with lib; {
description = "Provides a Virtual (SCSI) HBA";
homepage = "https://cdemu.sourceforge.io/about/vhba/";
platforms = platforms.linux;
license = licenses.gpl2Plus;
maintainers = with lib.maintainers; [ bendlas ];
};
}

View File

@@ -0,0 +1,105 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
autoreconfHook,
SDL,
SDL_net,
SDL_sound,
copyDesktopItems,
graphicsmagick,
libGL,
libGLU,
libpng,
binutils,
makeDesktopItem,
}:
stdenv.mkDerivation rec {
pname = "dosbox";
version = "0.74-3";
src = fetchurl {
url = "mirror://sourceforge/dosbox/dosbox-${version}.tar.gz";
hash = "sha256-wNE91+0u02O2jeYVR1eB6JHNWC6BYrXDZpE3UCIiJgo=";
};
patches = [
(fetchpatch {
url = "https://github.com/joncampbell123/dosbox-x/commit/006d5727d36d1ec598e387f2f1a3c521e3673dcb.patch";
includes = [ "src/gui/render_templates_sai.h" ];
hash = "sha256-HSO29/LgZRKQ3HQBA0QF5henG8pCSoe1R2joYNPcUcE=";
})
];
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
copyDesktopItems
graphicsmagick
SDL # for sdl-config during build time
];
depsBuildBuild = [
binutils # build calls `ar`
];
buildInputs = [
SDL
SDL_net
SDL_sound
libpng
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
libGL
libGLU
];
# Tests for SDL_net.h for modem & IPX support, not automatically picked up due to being in SDL subdirectory
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL_net}/include/SDL";
hardeningDisable = [ "format" ];
configureFlags = lib.optional stdenv.hostPlatform.isDarwin "--disable-sdltest";
desktopItems = [
(makeDesktopItem {
name = "dosbox";
exec = "dosbox";
icon = "dosbox";
comment = "x86 dos emulator";
desktopName = "DOSBox";
genericName = "DOS emulator";
categories = [
"Emulator"
"Game"
];
})
];
postInstall = ''
mkdir -p $out/share/icons/hicolor/256x256/apps
gm convert src/dosbox.ico $out/share/icons/hicolor/256x256/apps/dosbox.png
'';
enableParallelBuilding = true;
meta = with lib; {
homepage = "http://www.dosbox.com/";
changelog = "https://www.dosbox.com/wiki/Releases";
description = "DOS emulator";
longDescription = ''
DOSBox is an emulator that recreates a MS-DOS compatible environment
(complete with Sound, Input, Graphics and even basic networking). This
environment is complete enough to run many classic MS-DOS games completely
unmodified. In order to utilize all of DOSBox's features you need to first
understand some basic concepts about the MS-DOS environment.
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ matthewbauer ];
platforms = platforms.unix;
mainProgram = "dosbox";
};
}

View File

@@ -0,0 +1,47 @@
{
stdenv,
lib,
fetchFromGitHub,
qmake,
qtbase,
qtdeclarative,
qtquickcontrols,
wrapQtAppsHook,
}:
stdenv.mkDerivation rec {
pname = "firebird-emu";
version = "1.6";
src = fetchFromGitHub {
owner = "nspire-emus";
repo = "firebird";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-ZptjlnOiF+hKuKYvBFJL95H5YQuR99d4biOco/MVEmE=";
};
nativeBuildInputs = [
wrapQtAppsHook
qmake
];
buildInputs = [
qtbase
qtdeclarative
qtquickcontrols
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
mv $out/bin/${pname}.app $out/Applications/
'';
meta = {
homepage = "https://github.com/nspire-emus/firebird";
changelog = "https://github.com/nspire-emus/firebird/releases/tag/v${version}";
description = "Third-party multi-platform emulator of the ARM-based TI-Nspire calculators";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ pneumaticat ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
gtk2,
SDL,
nasm,
zlib,
libpng,
libGLU,
libGL,
}:
stdenv.mkDerivation rec {
pname = "gens-gs";
version = "7";
src = fetchurl {
url = "http://retrocdn.net/images/6/6d/Gens-gs-r${version}.tar.gz";
sha256 = "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gtk2
SDL
nasm
zlib
libpng
libGLU
libGL
];
# Work around build failures on recent GTK.
# See http://ubuntuforums.org/showthread.php?p=10535837
env.NIX_CFLAGS_COMPILE = "-UGTK_DISABLE_DEPRECATED -UGSEAL_ENABLE";
meta = with lib; {
homepage = "https://segaretro.org/Gens/GS";
description = "Genesis/Mega Drive emulator";
platforms = [ "i686-linux" ];
license = licenses.gpl2Plus;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitLab,
cmake,
protobuf,
}:
stdenv.mkDerivation rec {
pname = "goldberg-emu";
version = "0.2.5";
src = fetchFromGitLab {
owner = "mr_goldberg";
repo = "goldberg_emulator";
rev = version;
hash = "sha256-goOgMNjtDmIKOAv9sZwnPOY0WqTN90LFJ5iEp3Vkzog=";
};
# It attempts to install windows-only libraries which we never build
patches = [ ./dont-install-unsupported.patch ];
postPatch = ''
# Fix gcc-13 build failure due to missing <string> include.
sed -e '1i #include <string>' -i dll/settings.h
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ protobuf ];
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/share/goldberg"
];
preFixup = ''
mkdir -p $out/{bin,lib}
chmod +x $out/share/goldberg/tools/find_interfaces.sh
ln -s $out/share/goldberg/libsteam_api.so $out/lib
ln -s $out/share/goldberg/lobby_connect/lobby_connect $out/bin
ln -s $out/share/goldberg/tools/generate_interfaces_file $out/bin
ln -s $out/share/goldberg/tools/find_interfaces.sh $out/bin/find_interfaces
'';
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
homepage = "https://gitlab.com/Mr_Goldberg/goldberg_emulator";
changelog = "https://gitlab.com/Mr_Goldberg/goldberg_emulator/-/releases";
description = "Program that emulates steam online features";
longDescription = ''
Steam emulator that emulates steam online features. Lets you play games that
use the steam multiplayer apis on a LAN without steam or an internet connection.
'';
mainProgram = "lobby_connect";
license = licenses.lgpl3Only;
platforms = platforms.unix;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index abaace2..5e3465c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -182,10 +182,10 @@ if(WIN32)
RUNTIME DESTINATION ./
)
else()
- install(TARGETS
- ${LIB_STEAMCLIENT}
- LIBRARY DESTINATION ./
- )
+ # install(TARGETS
+ #${LIB_STEAMCLIENT}
+ #LIBRARY DESTINATION ./
+ #)
endif()
if(NOT WIN32)
@@ -220,10 +220,10 @@ if(WIN32)
RUNTIME DESTINATION ./
)
else()
- install(TARGETS
- ${LIB_STEAMNETWORKINGSOCKETS}
- LIBRARY DESTINATION ./
- )
+ # install(TARGETS
+ # ${LIB_STEAMNETWORKINGSOCKETS}
+ # LIBRARY DESTINATION ./
+ # )
endif()
if(NOT WIN32)

View File

@@ -0,0 +1,111 @@
{
stdenv,
lib,
writeText,
fetchurl,
upx,
libGL,
libGLU,
glib,
gtk2,
alsa-lib,
libSM,
libX11,
gdk-pixbuf,
pango,
libXinerama,
mpg123,
runtimeShell,
}:
let
libPath = lib.makeLibraryPath [
stdenv.cc.cc
libGL
libGLU
glib
gtk2
alsa-lib
libSM
libX11
gdk-pixbuf
pango
libXinerama
];
in
stdenv.mkDerivation {
pname = "kega-fusion";
version = "3.63x";
src = fetchurl {
url = "http://www.carpeludum.com/download/Fusion363x.tar.gz";
sha256 = "14s6czy20h5khyy7q95hd7k77v17ssafv9l6lafkiysvj2nmw94g";
};
plugins = fetchurl {
url = "http://www.carpeludum.com/download/PluginsLinux.tar.gz";
sha256 = "0d623cvh6n5ijj3wb64g93mxx2xbichsn7hj7brbb0ndw5cs70qj";
};
runner = writeText "kega-fusion" ''
#!${runtimeShell} -ex
kega_libdir="@out@/lib/kega-fusion"
kega_localdir="$HOME/.Kega Fusion"
# create local plugins directory if not present
mkdir -p "$kega_localdir/Plugins"
# create links for every included plugin
if [ $(ls -1A $kega_libdir/plugins | wc -l) -gt 0 ]; then
for i in $kega_libdir/plugins/*; do
if [ ! -e "$kega_localdir/Plugins/$(basename "$i")" ]; then
ln -sf "$i" "$kega_localdir/Plugins/"
fi
done
fi
# copy configuration file if not present
if ! [ -f "$kega_localdir/Fusion.ini" ]; then
cat > "$kega_localdir/Fusion.ini" <<EOF
ALSADeviceName=default
libmpg123path=${lib.getLib mpg123}/lib/libmpg123.so.0
EOF
else
sed -i 's,^\(libmpg123path=\).*,\1${lib.getLib mpg123}/lib/libmpg123.so.0,' "$kega_localdir/Fusion.ini"
fi
# here we go!
exec "$kega_libdir/Fusion" "$@"
'';
dontStrip = true;
dontPatchELF = true;
nativeBuildInputs = [ upx ];
installPhase = ''
upx -d Fusion
install -Dm755 Fusion "$out/lib/kega-fusion/Fusion"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}" "$out/lib/kega-fusion/Fusion"
tar -xaf $plugins
mkdir -p "$out/lib/kega-fusion/plugins"
cp -r Plugins/*.rpi "$out/lib/kega-fusion/plugins"
mkdir -p "$out/bin"
substitute "$runner" "$out/bin/kega-fusion" --subst-var out
chmod +x "$out/bin/kega-fusion"
'';
meta = with lib; {
description = "Sega SG1000, SC3000, SF7000, Master System, Game Gear, Genesis/Megadrive, SVP, Pico, SegaCD/MegaCD and 32X emulator";
homepage = "https://www.carpeludum.com/kega-fusion/";
maintainers = [ ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfreeRedistributable;
platforms = [ "i686-linux" ];
mainProgram = "kega-fusion";
};
}

View File

@@ -0,0 +1,40 @@
# Libretro
[libretro cores](https://docs.libretro.com/guides/core-list/) and related
packages.
## Adding new cores
The basic steps to add a new core are:
1. Add a new core using `mkLibretroCore` function (use one of the existing
cores as an example)
2. Add your new core to [`default.nix`](./default.nix) file
3. Try to build your core with `nix-build -A libretro.<core>`
## Using RetroArch with cores
To create a custom RetroArch derivation with the cores you want (instead of
using `retroarch-full` that includes all cores), you can use `.withCores` like
this:
```nix
{ pkgs, ... }:
let
retroarchWithCores = (
pkgs.retroarch.withCores (
cores: with cores; [
bsnes
mgba
quicknes
]
)
);
in
{
environment.systemPackages = [ retroarchWithCores ];
}
```
For advanced customization, see `wrapRetroArch` wrapper.

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore rec {
core = "atari800";
version = "0-unstable-2024-10-31";
src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-atari800";
rev = "6a18cb23cc4a7cecabd9b16143d2d7332ae8d44b";
hash = "sha256-+cZXHtaXnpU/zCwiDtjkyNMFGDahiHzqV2FoTCRnUWE=";
};
makefile = "Makefile";
makeFlags = [ "GIT_VERSION=${builtins.substring 0 7 src.rev}" ];
meta = {
description = "Port of Atari800 to libretro";
homepage = "https://github.com/libretro/libretro-atari800";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-gba";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-gba-libretro";
rev = "6cee80685f735ea6c2373db2622a1f1ee9f39d39";
hash = "sha256-a3XgExXVCUFw3GLCUkEl6now2L8qVdNOaXvrDMcT1ZE=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's GameBoy Advance core to libretro";
homepage = "https://github.com/libretro/beetle-gba-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-lynx";
version = "0-unstable-2025-05-10";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-lynx-libretro";
rev = "efd1797c7aa5a83c354507b1b61ac24222ebaa58";
hash = "sha256-K+VZYqNl3G1eE7dSlfmZFCoS5bKIyGSNNu2i737bKnM=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's Lynx core to libretro";
homepage = "https://github.com/libretro/beetle-lynx-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-ngp";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-ngp-libretro";
rev = "139fe34c8dfc5585d6ee1793a7902bca79d544de";
hash = "sha256-ruWnCgMxfpPHTWQ7vgNUczmGRzNKKhoZTNlUcNgm4T8=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's NeoGeo Pocket core to libretro";
homepage = "https://github.com/libretro/beetle-ngp-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-pce-fast";
version = "0-unstable-2025-09-26";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-pce-fast-libretro";
rev = "6c89e833b1aa0e0c5cd894f90a2dd09b579ffa4d";
hash = "sha256-R7qSeCRWoMe3mMpHZy4GWatlVS8x+4vn8bughHdaVb0=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's PC Engine fast core to libretro";
homepage = "https://github.com/libretro/beetle-pce-fast-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-pce";
version = "0-unstable-2025-06-22";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-pce-libretro";
rev = "9a301c0773c53702a882bbaa42ee9cbc6d523787";
hash = "sha256-RS5omi6LthQy8fFfouSEpYtaeD7QDlRENm0YuqHzUc0=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's PC Engine core to libretro";
homepage = "https://github.com/libretro/beetle-pce-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-pcfx";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-pcfx-libretro";
rev = "dd04cef9355286488a1d78ff18c4c848a1575540";
hash = "sha256-oFBuriCbJWjgPH9RRAM/XUvkW0gKXnvs7lmBpJpWewo=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's PCFX core to libretro";
homepage = "https://github.com/libretro/beetle-pcfx-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
libGL,
libGLU,
fetchFromGitHub,
mkLibretroCore,
withHw ? false,
}:
mkLibretroCore {
core = "mednafen-psx" + lib.optionalString withHw "-hw";
version = "0-unstable-2025-10-03";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-psx-libretro";
rev = "4968db4255bd8853137132c5d0809becd7638026";
hash = "sha256-MVcz+c5ExZZuda5ene4nhidd/zZNvXcAg+wCinQisME=";
};
extraBuildInputs = lib.optionals withHw [
libGL
libGLU
];
makefile = "Makefile";
makeFlags = [
"HAVE_HW=${if withHw then "1" else "0"}"
"HAVE_LIGHTREC=1"
];
meta = {
description =
"Port of Mednafen's PSX Engine core to libretro"
+ lib.optionalString withHw " (with hardware acceleration support)";
homepage = "https://github.com/libretro/beetle-psx-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-saturn";
version = "0-unstable-2025-07-01";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-saturn-libretro";
rev = "ccba5265f60f8e64a1984c9d14d383606193ea6a";
hash = "sha256-Ixjduv67sPJmf0BH8GaJyyTdpDV/e1UCWCeOb7vLggo=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's Saturn core to libretro";
homepage = "https://github.com/libretro/beetle-saturn-libretro";
license = lib.licenses.gpl2Only;
platforms = [
"aarch64-linux"
"x86_64-linux"
];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-supafaust";
version = "0-unstable-2024-09-30";
src = fetchFromGitHub {
owner = "libretro";
repo = "supafaust";
rev = "e25f66765938d33f9ad5850e8d6cd597e55b7299";
hash = "sha256-ZgOXHhEHt54J2B1q6uA8v6uOK53g7idJlgoC4guTGow=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's experimental snes_faust core to libretro";
homepage = "https://github.com/libretro/supafaust";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-supergrafx";
version = "0-unstable-2024-11-15";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-supergrafx-libretro";
rev = "a776133c34ae8da5daf7d9ccb43e3e292e2b07b0";
hash = "sha256-FemWW4EPQCwhrS7YEytf6fEeimdTTfzaDdyRNDIBQyk=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's SuperGrafx core to libretro";
homepage = "https://github.com/libretro/beetle-supergrafx-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-vb";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-vb-libretro";
rev = "8f837ebc077afdd6652efb2827fd8308a07113ca";
hash = "sha256-eAnBubNhj78G4r8OHVqwFXGOSA9wEYI6ZwNyiwDW8W8=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's VirtualBoy core to libretro";
homepage = "https://github.com/libretro/beetle-vb-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mednafen-wswan";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "beetle-wswan-libretro";
rev = "2aeb47d3a58bf0360c686f842d9bb5bd201306fe";
hash = "sha256-LrF9p5tPtUamVLC41bJxcYDKvHmhVfwMieyIAdHaGmU=";
};
makefile = "Makefile";
meta = {
description = "Port of Mednafen's WonderSwan core to libretro";
homepage = "https://github.com/libretro/beetle-wswan-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "blastem";
version = "0-unstable-2022-07-26";
src = fetchFromGitHub {
owner = "libretro";
repo = "blastem";
rev = "277e4a62668597d4f59cadda1cbafb844f981d45";
hash = "sha256-EHvKElPw8V5Z6LnMaQXBCdM4niLIlF3aBm8dRbeYXHs=";
};
meta = {
description = "Port of BlastEm to libretro";
homepage = "https://github.com/libretro/blastem";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.x86;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "bluemsx";
version = "0-unstable-2025-09-27";
src = fetchFromGitHub {
owner = "libretro";
repo = "bluemsx-libretro";
rev = "7074551cf50ebdae78c8cce4e77560f9fc4575ca";
hash = "sha256-kmG0LCvWG+4wM+hwZ8TYQid12nZuQpNbaljym+glbz4=";
};
meta = {
description = "Port of BlueMSX to libretro";
homepage = "https://github.com/libretro/blueMSX-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
xorg,
}:
mkLibretroCore {
core = "bsnes-hd-beta";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "DerKoun";
repo = "bsnes-hd";
rev = "0bb7b8645e22ea2476cabd58f32e987b14686601";
hash = "sha256-YzWSZMn6v5hWIHnp6KmmpevCsf35Vi2BCcmFMnrFPH0=";
};
extraBuildInputs = [
xorg.libX11
xorg.libXext
];
makefile = "GNUmakefile";
makeFlags = [
"-C"
"bsnes"
"target=libretro"
"platform=linux"
];
postBuild = "cd bsnes/out";
meta = {
description = "Port of bsnes-hd to libretro";
homepage = "https://github.com/DerKoun/bsnes-hd";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
withProfile ? "accuracy",
}:
mkLibretroCore {
core = "bsnes-mercury-${withProfile}";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "bsnes-mercury";
rev = "0f35d044bf2f2b879018a0500e676447e93a1db1";
hash = "sha256-skVREKYITZn+gKKSZmwuBCWrG0jb/pifwIgat8VyQ8U=";
};
makefile = "Makefile";
makeFlags = [ "PROFILE=${withProfile}" ];
meta = {
description = "Fork of bsnes with HLE DSP emulation restored (${withProfile} profile)";
homepage = "https://github.com/libretro/bsnes-mercury";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "bsnes";
version = "0-unstable-2025-10-03";
src = fetchFromGitHub {
owner = "libretro";
repo = "bsnes-libretro";
rev = "e0e6cef46582a436e8b08a339f4751411dc5bd63";
hash = "sha256-fIlTIF1042oWIHxqD7h7MdUfb6QDfIP0jqVlBNOTBmY=";
};
makefile = "Makefile";
meta = {
description = "Port of bsnes to libretro";
homepage = "https://github.com/libretro/bsnes-libretro";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
cmake,
fetchFromGitHub,
libGL,
libGLU,
libX11,
mkLibretroCore,
}:
mkLibretroCore {
core = "citra";
version = "0-unstable-2025-08-17";
src = fetchFromGitHub {
owner = "libretro";
repo = "citra";
rev = "5263fae3344e5e9af43036e0e38bec2d10fb2407";
hash = "sha256-66kbE1taODjxXDhO3uV5R212nikyXfHwCHC/zamZuL0=";
fetchSubmodules = true;
};
makefile = "Makefile";
extraBuildInputs = [
libGL
libGLU
libX11
];
extraNativeBuildInputs = [ cmake ];
# https://github.com/libretro/citra/blob/a31aff7e1a3a66f525b9ea61633d2c5e5b0c8b31/.gitlab-ci.yml#L6
cmakeFlags = [
(lib.cmakeBool "ENABLE_TESTS" false)
(lib.cmakeBool "ENABLE_DEDICATED_ROOM" false)
(lib.cmakeBool "ENABLE_SDL2" false)
(lib.cmakeBool "ENABLE_QT" false)
(lib.cmakeBool "ENABLE_WEB_SERVICE" false)
(lib.cmakeBool "ENABLE_SCRIPTING" false)
(lib.cmakeBool "ENABLE_OPENAL" false)
(lib.cmakeBool "ENABLE_LIBUSB" false)
(lib.cmakeBool "CITRA_ENABLE_BUNDLE_TARGET" false)
(lib.cmakeBool "CITRA_WARNINGS_AS_ERRORS" false)
];
meta = {
description = "Port of Citra to libretro";
homepage = "https://github.com/libretro/citra";
license = lib.licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
mkLibretroCore,
libpcap,
libGLU,
libGL,
xorg,
}:
mkLibretroCore {
core = "desmume";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "desmume";
rev = "7f05a8d447b00acd9e0798aee97b4f72eb505ef9";
hash = "sha256-BttWMunVbfPOTGx+DV+3QyOwW+55tgXKVIn99DZhbBI=";
};
extraBuildInputs = [
libpcap
libGLU
libGL
xorg.libX11
];
makeFlags =
lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0";
preBuild = "cd desmume/src/frontend/libretro";
meta = {
description = "Port of DeSmuME to libretro";
homepage = "https://github.com/libretro/desmume";
license = lib.licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
mkLibretroCore,
libpcap,
libGLU,
libGL,
xorg,
}:
mkLibretroCore {
core = "desmume2015";
version = "0-unstable-2022-04-05";
src = fetchFromGitHub {
owner = "libretro";
repo = "desmume2015";
rev = "af397ff3d1f208c27f3922cc8f2b8e08884ba893";
hash = "sha256-kEb+og4g7rJvCinBZKcb42geZO6W8ynGsTG9yqYgI+U=";
};
extraBuildInputs = [
libpcap
libGLU
libGL
xorg.libX11
];
makeFlags =
lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0";
preBuild = "cd desmume";
meta = {
description = "Port of DeSmuME ~2015 to libretro";
homepage = "https://github.com/libretro/desmume2015";
license = lib.licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
fetchFromGitHub,
cmake,
curl,
gettext,
hidapi,
libGL,
libGLU,
libevdev,
mkLibretroCore,
pcre,
pkg-config,
sfml,
udev,
xorg,
}:
mkLibretroCore {
core = "dolphin";
version = "0-unstable-2025-08-05";
src = fetchFromGitHub {
owner = "libretro";
repo = "dolphin";
rev = "83438f9b1a2c832319876a1fda130a5e33d4ef87";
hash = "sha256-q4y+3uJ1tQ2OvlEvi/JNyIO/RfuWNIEKfVZ6xEWKFCg=";
};
extraNativeBuildInputs = [
cmake
curl
pkg-config
];
extraBuildInputs = [
gettext
hidapi
libGL
libGLU
libevdev
pcre
sfml
udev
xorg.libSM
xorg.libX11
xorg.libXext
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.libpthreadstubs
xorg.libxcb
xorg.xcbutil
];
makefile = "Makefile";
cmakeFlags = [
"-DLIBRETRO=ON"
"-DLIBRETRO_STATIC=1"
"-DENABLE_QT=OFF"
"-DENABLE_LTO=OFF"
"-DUSE_UPNP=OFF"
"-DUSE_DISCORD_PRESENCE=OFF"
];
dontUseCmakeBuildDir = true;
meta = {
description = "Port of Dolphin to libretro";
homepage = "https://github.com/libretro/dolphin";
license = lib.licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "dosbox-pure";
version = "0-unstable-2025-09-28";
src = fetchFromGitHub {
owner = "schellingb";
repo = "dosbox-pure";
rev = "150a8e02ec53bfd5fc571587dab902c075f9e291";
hash = "sha256-3l566sa5sCjeppUD06chpTZ21CnfEzdRpZKM7jxkS2M=";
};
hardeningDisable = [ "format" ];
makefile = "Makefile";
meta = {
description = "Port of DOSBox to libretro aiming for simplicity and ease of use";
homepage = "https://github.com/schellingb/dosbox-pure";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "dosbox";
version = "0-unstable-2022-07-18";
src = fetchFromGitHub {
owner = "libretro";
repo = "dosbox-libretro";
rev = "b7b24262c282c0caef2368c87323ff8c381b3102";
hash = "sha256-PG2eElenlEpu0U/NIh53p0uLqewnEdaq6Aoak5E1P3I=";
};
env.CXXFLAGS = "-std=gnu++11";
meta = {
description = "Port of DOSBox to libretro";
homepage = "https://github.com/libretro/dosbox-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,88 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
nix-update-script,
asciidoctor,
cmake,
doxygen,
pkg-config,
flac,
fluidsynth,
fmt,
freetype,
glib,
harfbuzz,
lhasa,
liblcf,
libpng,
libsndfile,
libsysprof-capture,
libvorbis,
libxmp,
mpg123,
nlohmann_json,
opusfile,
pcre2,
pixman,
speexdsp,
wildmidi,
}:
mkLibretroCore rec {
core = "easyrpg";
# liblcf needs to be updated before this.
version = "0.8.1.1";
src = fetchFromGitHub {
owner = "EasyRPG";
repo = "Player";
rev = version;
hash = "sha256-2a8IdYP6Suc8a+Np5G+xoNzuPxkk9gAgR+sjdKUf89M=";
fetchSubmodules = true;
};
extraNativeBuildInputs = [
asciidoctor
cmake
doxygen
pkg-config
];
extraBuildInputs = [
flac # needed by libsndfile
fluidsynth
fmt
freetype
glib
harfbuzz
lhasa
liblcf
libpng
libsndfile
libsysprof-capture # needed by glib
libvorbis
libxmp
mpg123
nlohmann_json
opusfile
pcre2 # needed by glib
pixman
speexdsp
wildmidi
];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DPLAYER_TARGET_PLATFORM=libretro"
"-DCMAKE_INSTALL_DATADIR=${placeholder "out"}/share"
];
makefile = "Makefile";
# Since liblcf needs to be updated before this, we should not
# use the default unstableGitUpdater.
passthru.updateScript = nix-update-script { };
meta = {
description = "EasyRPG Player libretro port";
homepage = "https://github.com/EasyRPG/Player";
license = lib.licenses.gpl3Plus;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "81";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "81-libretro";
rev = "ffc99f27f092addc9ddd34dd0e3a3d4d1c053cbf";
hash = "sha256-3AIXk3LJHZHWIojMeo2BJHWYDHQ17WVbkwjFhXM14ZE=";
};
meta = {
description = "Port of EightyOne to libretro";
homepage = "https://github.com/libretro/81-libretro";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
runCommand,
zlib,
}:
mkLibretroCore rec {
core = "fbalpha2012";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "fbalpha2012";
rev = "77167cea72e808384c136c8c163a6b4975ce7a84";
hash = "sha256-giEV09dT/e82bmDlRkxpkW04JcsEZc/enIPecqYtg3c=";
};
sourceRoot = "${src.name}/svn-current/trunk";
# unvendor zlib and broken minizip code
postPatch =
let
minizip-src = runCommand "minizip-src" { } ''
mkdir $out
unpackFile ${zlib.src}
cp */contrib/minizip/{unzip.*,ioapi.*,crypt.h} $out/
'';
in
''
substituteInPlace ${makefile} \
--replace-fail '-I$(FBA_LIB_DIR)/zlib' ""
cp ${minizip-src}/* src/burner
'';
buildInputs = [ zlib ];
makeFlags = [ "EXTERNAL_ZLIB=1" ];
makefile = "makefile.libretro";
meta = {
description = "Port of Final Burn Alpha ~2012 to libretro";
homepage = "https://github.com/libretro/fbalpha2012";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "fbneo";
version = "0-unstable-2025-09-30";
src = fetchFromGitHub {
owner = "libretro";
repo = "fbneo";
rev = "9726100ba22a558290860a2648e1e6a8b8719478";
hash = "sha256-mhXuHPwXtvuA8ltaLF3uOsBwLE0evJ2RiCrNX5hnRXM=";
};
makefile = "Makefile";
preBuild = "cd src/burner/libretro";
meta = {
description = "Port of FBNeo to libretro";
homepage = "https://github.com/libretro/fbneo";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "fceumm";
version = "0-unstable-2025-09-13";
src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-fceumm";
rev = "5cd4a43e16a7f3cd35628d481c347a0a98cfdfa2";
hash = "sha256-/FvXQlp20QMFg1uPmj2HSJFXhzBunygOmGEtGNGJyxk=";
};
meta = {
description = "FCEUmm libretro port";
homepage = "https://github.com/libretro/libretro-fceumm";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
cmake,
libGL,
libGLU,
}:
mkLibretroCore {
core = "flycast";
version = "0-unstable-2025-10-03";
src = fetchFromGitHub {
owner = "flyinghead";
repo = "flycast";
rev = "af5f67c15d52b16d35e95671a5b74502288c4397";
hash = "sha256-eMkyNwGdgyYDmwqYy3xzzSTYqUcoKpQkDYFP8bQdz58=";
fetchSubmodules = true;
};
extraNativeBuildInputs = [ cmake ];
extraBuildInputs = [
libGL
libGLU
];
cmakeFlags = [ "-DLIBRETRO=ON" ];
makefile = "Makefile";
meta = {
description = "Flycast libretro port";
homepage = "https://github.com/flyinghead/flycast";
license = lib.licenses.gpl2Only;
platforms = [
"aarch64-linux"
"x86_64-linux"
];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "fmsx";
version = "0-unstable-2025-07-31";
src = fetchFromGitHub {
owner = "libretro";
repo = "fmsx-libretro";
rev = "fbe4dfc4c3e3f7eb27089def3d663a905b181845";
hash = "sha256-1hZQO16SDB8n1wdTP67Kpns3izg/nPGl5M7wjFDBjGc=";
};
makefile = "Makefile";
meta = {
description = "FMSX libretro port";
homepage = "https://github.com/libretro/fmsx-libretro";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "freeintv";
version = "0-unstable-2025-03-05";
src = fetchFromGitHub {
owner = "libretro";
repo = "freeintv";
rev = "6efc4b8fd4c7423ec1f5ff1913b854529135b565";
hash = "sha256-B5GEzI/U/F0IsppdOx5znu+4LdZOxQLcGAez+oR2PCI=";
};
makefile = "Makefile";
meta = {
description = "FreeIntv libretro port";
homepage = "https://github.com/libretro/freeintv";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "fuse";
version = "0-unstable-2024-11-24";
src = fetchFromGitHub {
owner = "libretro";
repo = "fuse-libretro";
rev = "cad85b7b1b864c65734f71aa4a510b6f6536881c";
hash = "sha256-SdwdcR9szJJoUxQ4y8rh40Bdnn5ZI2qV4OcS39BFViQ=";
};
meta = {
description = "Port of the Fuse Unix Spectrum Emulator to libretro";
homepage = "https://github.com/libretro/fuse-libretro";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "gambatte";
version = "0-unstable-2025-09-18";
src = fetchFromGitHub {
owner = "libretro";
repo = "gambatte-libretro";
rev = "0092232a0aaef0ded0ead1c2003ccf7a85ccdfc0";
hash = "sha256-baiTlYArNSBz79Cm16Sg3VZEp909zMkF/ExqhrPYN80=";
};
meta = {
description = "Gambatte libretro port";
homepage = "https://github.com/libretro/gambatte-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "genesis-plus-gx";
version = "0-unstable-2025-10-06";
src = fetchFromGitHub {
owner = "libretro";
repo = "Genesis-Plus-GX";
rev = "252a94c0c40047b52d9ecced567846a9dd5b2020";
hash = "sha256-Eys3iDJfi3bRuPjWRK34CEAN5o5MC+of1ktT7z2DdAI=";
};
meta = {
description = "Enhanced Genesis Plus libretro port";
homepage = "https://github.com/libretro/Genesis-Plus-GX";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "gpsp";
version = "0-unstable-2025-09-17";
src = fetchFromGitHub {
owner = "libretro";
repo = "gpsp";
rev = "a545aafaf4e654a488f4588f4f302d8413a58066";
hash = "sha256-94J5WqlvBgfF/0aj0Pu61psG5pbhJVsZOiIbMdZ+ryQ=";
};
makefile = "Makefile";
meta = {
description = "Port of gpSP to libretro";
homepage = "https://github.com/libretro/gpsp";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "gw";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "gw-libretro";
rev = "435e5cfd4bf6aea03a84259e9b8dba3daf3ff5bd";
hash = "sha256-csaOqrZMSk9xZUlGAKgypV38q9XE7K6hLLdBC10g9Ao=";
};
makefile = "Makefile";
meta = {
description = "Port of Game and Watch to libretro";
homepage = "https://github.com/libretro/gw-libretro";
license = lib.licenses.zlib;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "handy";
version = "0-unstable-2025-06-16";
src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-handy";
rev = "fca239207e9c111da3e85d2faf0b1b9d7524e498";
hash = "sha256-8RpRhGgW5JWY6TZa9CEaXF66WpbjcjprorVqu+FGYu0=";
};
makefile = "Makefile";
meta = {
description = "Port of Handy to libretro";
homepage = "https://github.com/libretro/libretro-handy";
license = lib.licenses.zlib;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
which,
}:
mkLibretroCore {
core = "hatari";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "hatari";
rev = "7008194d3f951a157997f67a820578f56f7feee0";
hash = "sha256-ZPzwUBaxs2ivE9n9cb5XB5mhixY9b6qIlq7OiVSLbqg=";
};
extraNativeBuildInputs = [ which ];
dontConfigure = true;
# zlib is already included in mkLibretroCore as buildInputs
makeFlags = [ "EXTERNAL_ZLIB=1" ];
meta = {
description = "Port of Hatari to libretro";
homepage = "https://github.com/libretro/hatari";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
python3,
alsa-lib,
libGLU,
libGL,
}:
mkLibretroCore {
core = "mame";
version = "0-unstable-2025-09-26";
src = fetchFromGitHub {
owner = "libretro";
repo = "mame";
rev = "61743c76180f1ad454227ed1be0261a071d37d67";
hash = "sha256-R7zBl8Y5tnG+CkFgyTdwlGlCLwG/9Svs3hsJJp12fOY=";
fetchSubmodules = true;
};
extraNativeBuildInputs = [ python3 ];
extraBuildInputs = [
alsa-lib
libGLU
libGL
];
# Setting this is breaking compilation of src/3rdparty/genie for some reason
makeFlags = [ "ARCH=" ];
meta = {
description = "Port of MAME to libretro";
homepage = "https://github.com/libretro/mame";
license = with lib.licenses; [
bsd3
gpl2Plus
];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
stdenv,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mame2000";
version = "0-unstable-2024-07-01";
src = fetchFromGitHub {
owner = "libretro";
repo = "mame2000-libretro";
rev = "2ec60f6e1078cf9ba173e80432cc28fd4eea200f";
hash = "sha256-AYZj7bvO9oc7wmEBbj6DPRzpQFHl8diIcunSSpD4Vok=";
};
makefile = "Makefile";
makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "IS_X86=0";
meta = {
description = "Port of MAME ~2000 to libretro, compatible with MAME 0.37b5 sets";
homepage = "https://github.com/libretro/mame2000-libretro";
# MAME license, non-commercial clause
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mame2003-plus";
version = "0-unstable-2025-09-30";
src = fetchFromGitHub {
owner = "libretro";
repo = "mame2003-plus-libretro";
rev = "59b8a9fb06a47a3ce6aecd09b07f3f001e3d9b08";
hash = "sha256-hfC/6UqUSDd2FWpcCVcw4pkAtyHJGCgvG4UKlkM+fpk=";
};
makefile = "Makefile";
meta = {
description = "Port of MAME ~2003+ to libretro, compatible with MAME 0.78 sets";
homepage = "https://github.com/libretro/mame2003-plus-libretro";
# MAME license, non-commercial clause
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mame2003";
version = "0-unstable-2025-08-26";
src = fetchFromGitHub {
owner = "libretro";
repo = "mame2003-libretro";
rev = "dfddf4db86a3acd5997ce9419c7afd00ff6587a0";
hash = "sha256-GJRawFdlHCfBRiErJJ3ZvZDF1gvYVkuQvKXV1qUCCRQ=";
};
# Fix build with GCC 14
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
makefile = "Makefile";
meta = {
description = "Port of MAME ~2003 to libretro, compatible with MAME 0.78 sets";
homepage = "https://github.com/libretro/mame2003-libretro";
# MAME license, non-commercial clause
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mame2010";
version = "0-unstable-2024-10-23";
src = fetchFromGitHub {
owner = "libretro";
repo = "mame2010-libretro";
rev = "c5b413b71e0a290c57fc351562cd47ba75bac105";
hash = "sha256-p+uEhxjr/07YJxInhW7oJDr8KurD36JxnSfJo17FOxM=";
};
makefile = "Makefile";
makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [
"PTR64=1"
"ARM_ENABLED=1"
"X86_SH2DRC=0"
"FORCE_DRC_C_BACKEND=1"
];
meta = {
description = "Port of MAME ~2010 to libretro, compatible with MAME 0.139 sets";
homepage = "https://github.com/libretro/mame2010-libretro";
# MAME license, non-commercial clause
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
alsa-lib,
fetchFromGitHub,
mkLibretroCore,
python3,
}:
mkLibretroCore {
core = "mame2015";
version = "0-unstable-2023-10-31";
src = fetchFromGitHub {
owner = "libretro";
repo = "mame2015-libretro";
rev = "316cd06349f2b34b4719f04f7c0d07569a74c764";
hash = "sha256-CBN04Jf26SIk8mKWlui5spQGokBvgFUCvFiC8NoBGw0=";
};
patches = [ ./patches/mame2015-python311.patch ];
makeFlags = [ "PYTHON=python3" ];
extraNativeBuildInputs = [ python3 ];
extraBuildInputs = [ alsa-lib ];
makefile = "Makefile";
# Build failures when this is set to a bigger number
NIX_BUILD_CORES = 8;
meta = {
description = "Port of MAME ~2015 to libretro, compatible with MAME 0.160 sets";
homepage = "https://github.com/libretro/mame2015-libretro";
# MAME license, non-commercial clause
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
alsa-lib,
fetchFromGitHub,
mkLibretroCore,
python3,
rapidjson,
}:
mkLibretroCore {
core = "mame2016";
version = "0-unstable-2022-04-06";
src = fetchFromGitHub {
owner = "libretro";
repo = "mame2016-libretro";
rev = "01058613a0109424c4e7211e49ed83ac950d3993";
hash = "sha256-IsM7f/zlzvomVOYlinJVqZllUhDfy4NNTeTPtNmdVak=";
};
postPatch = ''
rm -r 3rdparty/rapidjson
ln -s ${lib.getInclude rapidjson} 3rdparty/rapidjson
'';
patches = [ ./patches/mame2016-python311.patch ];
extraNativeBuildInputs = [ python3 ];
extraBuildInputs = [ alsa-lib ];
makeFlags = [ "PYTHON_EXECUTABLE=python3" ];
env = {
# Build failures when this is set to a bigger number
NIX_BUILD_CORES = 8;
# Fix build errors in GCC 13
NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive";
};
meta = {
description = "Port of MAME ~2016 to libretro, compatible with MAME 0.174 sets";
homepage = "https://github.com/libretro/mame2016-libretro";
license = with lib.licenses; [
bsd3
gpl2Plus
];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
libGLU,
libGL,
}:
mkLibretroCore {
core = "melonds";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "melonds";
rev = "7a3c11ff970cd36ca806961fae6db94b30dd5401";
hash = "sha256-YGkRdth7qdATcZpJkBd5MGOJFG1AbeJhAnyir+ssZYA=";
};
extraBuildInputs = [
libGLU
libGL
];
makefile = "Makefile";
meta = {
description = "Port of MelonDS to libretro";
homepage = "https://github.com/libretro/melonds";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mesen-s";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "mesen-s";
rev = "d4fca31a6004041d99b02199688f84c009c55967";
hash = "sha256-mGGTLBRJCsNJg57LWSFndIv/LLzEmVRnv6gNbllkV/Y=";
};
makefile = "Makefile";
preBuild = "cd Libretro";
normalizeCore = false;
meta = {
description = "Port of Mesen-S to libretro";
homepage = "https://github.com/libretro/mesen-s";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mesen";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "mesen";
rev = "791c5e8153ee6e29691d45b5df2cf1151ff416f9";
hash = "sha256-PEEGJsyT+D/JwBxH2H9OY2MwaGt1i+1kmDZUT6zROic=";
};
makefile = "Makefile";
preBuild = "cd Libretro";
meta = {
description = "Port of Mesen to libretro";
homepage = "https://github.com/libretro/mesen";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "meteor";
version = "0-unstable-2020-12-28";
src = fetchFromGitHub {
owner = "libretro";
repo = "meteor-libretro";
rev = "e533d300d0561564451bde55a2b73119c768453c";
hash = "sha256-zMkgzUz2rk0SD5ojY4AqaDlNM4k4QxuUxVBRBcn6TqQ=";
};
makefile = "Makefile";
preBuild = "cd libretro";
meta = {
description = "Port of Meteor to libretro";
homepage = "https://github.com/libretro/meteor";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "mgba";
version = "0-unstable-2025-07-24";
src = fetchFromGitHub {
owner = "libretro";
repo = "mgba";
rev = "affc86e4c07b6e1e8363e0bc1c5ffb813a2e32c9";
hash = "sha256-4nKghnpMI1LuKOKc0vSknTuq+bA0wpBux/a5mGCyev8=";
};
meta = {
description = "Port of mGBA to libretro";
homepage = "https://github.com/libretro/mgba";
license = lib.licenses.mpl20;
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore rec {
core = "mrboom";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "Javanaise";
repo = "mrboom-libretro";
rev = "d011acfbdb2d93ed38bd684ccfa0db79bda1c932";
hash = "sha256-DjTSrp38MwdEtUZPTgZYEZHWgv48IN1oHkKsVqmOwII=";
fetchSubmodules = true;
};
makefile = "Makefile";
makeFlags = [ "GIT_VERSION=${builtins.substring 0 7 src.rev}" ];
meta = {
description = "Port of Mr.Boom to libretro";
homepage = "https://github.com/Javanaise/mrboom-libretro";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
libGL,
libGLU,
libpng,
mkLibretroCore,
nasm,
xorg,
}:
mkLibretroCore {
core = "mupen64plus-next";
version = "0-unstable-2025-08-20";
src = fetchFromGitHub {
owner = "libretro";
repo = "mupen64plus-libretro-nx";
rev = "222acbd3f98391458a047874d0372fe78e14fe94";
hash = "sha256-esssh/0nxNUDW/eMDQbWEdcSPuqLjnKLkK4mKN17HjQ=";
};
# Fix for GCC 14
# https://github.com/libretro/mupen64plus-libretro-nx/pull/526
patches = [
(fetchpatch2 {
name = "minizip-avoid_trying_to_compile_problematic_code.patch";
url = "https://github.com/libretro/mupen64plus-libretro-nx/commit/2b05477dd9cd99e7f9425f58cb544f454fc0d813.patch?full_index=1";
hash = "sha256-Q0yymeS6taeFRt6BH6IX5q1SDUMh2Zn3mFpdJguyk9M=";
})
(fetchpatch2 {
name = "EmuThread-align_with_co_create()_and_pthread_create().patch";
url = "https://github.com/libretro/mupen64plus-libretro-nx/commit/26dfd670ffdd5ed6a03e6704dc73f82c13d81dd9.patch?full_index=1";
hash = "sha256-BraCR/b8DTmVAWrUxiXp9nxBYvTpTW9OQAt8TP1eusI=";
})
(fetchpatch2 {
name = "Fix_compilation_of_bundled_libzlib.patch";
url = "https://github.com/libretro/mupen64plus-libretro-nx/commit/3c3e7fbc70b8f533c09c964cf468ba5e8d61351c.patch?full_index=1";
hash = "sha256-PCJLNYhhccnWLcnPaHL6tz+5qdjogJRYfzZIh3r+Vlk=";
})
];
extraNativeBuildInputs = [
nasm
];
extraBuildInputs = [
libGLU
libGL
libpng
xorg.libX11
];
makefile = "Makefile";
makeFlags = [
"HAVE_PARALLEL_RDP=1"
"HAVE_PARALLEL_RSP=1"
"HAVE_THR_AL=1"
"LLE=1"
"WITH_DYNAREC=${stdenv.hostPlatform.parsed.cpu.name}"
];
meta = {
description = "Libretro port of Mupen64 Plus";
homepage = "https://github.com/libretro/mupen64plus-libretro-nx";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "neocd";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "neocd_libretro";
rev = "5eca2c8fd567b5261251c65ecafa8cf5b179d1d2";
hash = "sha256-72tmPCb7AXsamaQsMAPiYpgDR8DER2GTz4hcbN8wy7g=";
};
makefile = "Makefile";
meta = {
description = "NeoCD libretro port";
homepage = "https://github.com/libretro/neocd_libretro";
license = lib.licenses.lgpl3Only;
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "nestopia";
version = "0-unstable-2025-08-14";
src = fetchFromGitHub {
owner = "libretro";
repo = "nestopia";
rev = "51ad831fcd9f10a02dcb0cbf398c2cd1b028765e";
hash = "sha256-4TMJfD9KUBo5qJNOdnSEq2oEftL8Fpak6tHOP+tuG2U=";
};
makefile = "Makefile";
preBuild = "cd libretro";
meta = {
description = "Nestopia libretro port";
homepage = "https://github.com/libretro/nestopia";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore rec {
core = "np2kai";
version = "0-unstable-2024-11-03";
src = fetchFromGitHub {
owner = "AZO234";
repo = "NP2kai";
rev = "4b109eaac4f79b04065ff5025319fce51537e04d";
hash = "sha256-tRFvK8d5Y/umy/b1BKN85ZSaDWyK95hII4RVng7A5uU=";
fetchSubmodules = true;
};
makeFlags = [
# See https://github.com/AZO234/NP2kai/tags
"NP2KAI_VERSION=rev.22"
"NP2KAI_HASH=${builtins.substring 0 7 src.rev}"
];
# Fix build with GCC 14
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error=incompatible-pointer-types"
"-Wno-error=int-conversion"
];
preBuild = "cd sdl";
meta = {
description = "Neko Project II kai libretro port";
homepage = "https://github.com/AZO234/NP2kai";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "nxengine";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "nxengine-libretro";
rev = "9adc032a5f6aa913d71d22042bb72cb11cf0f4a2";
hash = "sha256-8XjZp18lQU3xFNDjIuNsSHn7Mhba8Lze/IeRsy8/U1U=";
};
makefile = "Makefile";
meta = {
description = "NXEngine libretro port";
homepage = "https://github.com/libretro/nxengine-libretro";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "o2em";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-o2em";
rev = "3ba4231c1dc8dcdf487428712856b790d2e4b8f3";
hash = "sha256-HhTkFm9Jte4wDPxTcXRgCg2tCfdQvo0M3nHRhlPmz/w=";
};
makefile = "Makefile";
meta = {
description = "Port of O2EM to libretro";
homepage = "https://github.com/libretro/libretro-o2em";
license = lib.licenses.artistic1;
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
stdenv,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "opera";
version = "0-unstable-2024-10-16";
src = fetchFromGitHub {
owner = "libretro";
repo = "opera-libretro";
rev = "67a29e60a4d194b675c9272b21b61eaa022f3ba3";
hash = "sha256-8896EWNbzVyr3MS1jtWD3pLur7ZvAhhJmrwkW3ayzkU=";
};
makefile = "Makefile";
makeFlags = [ "CC_PREFIX=${stdenv.cc.targetPrefix}" ];
meta = {
description = "Opera is a port of 4DO/libfreedo to libretro";
homepage = "https://github.com/libretro/libretro-o2em";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
libGL,
libGLU,
libpng,
mkLibretroCore,
}:
mkLibretroCore {
core = "parallel-n64";
version = "0-unstable-2025-08-05";
src = fetchFromGitHub {
owner = "libretro";
repo = "parallel-n64";
rev = "50d3ddd55b5774da643d90d7ad1e3cbd2c618883";
hash = "sha256-l42EKrZH1JwTxpkjl8vTrMsd2NJCeKV9Owgj+EB81eM=";
};
extraBuildInputs = [
libGLU
libGL
libpng
];
makefile = "Makefile";
makeFlags = [
"HAVE_PARALLEL=1"
"HAVE_PARALLEL_RSP=1"
"ARCH=${stdenv.hostPlatform.parsed.cpu.name}"
];
postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 ''
sed -i -e '1 i\CPUFLAGS += -DARM_FIX -DNO_ASM -DARM_ASM -DDONT_WANT_ARM_OPTIMIZATIONS -DARM64' Makefile \
&& sed -i -e 's,CPUFLAGS :=,,g' Makefile
'';
meta = {
description = "Parallel Mupen64plus rewrite for libretro";
homepage = "https://github.com/libretro/parallel-n64";
license = lib.licenses.gpl3Only;
badPlatforms = [
# ./mupen64plus-core/src/r4300/new_dynarec/arm64/linkage_aarch64.o: in function `.E12':
# (.text+0x5b4): relocation truncated to fit: R_AARCH64_CONDBR19 against symbol `invalidate_block' defined in .text section in ./mupen64plus-core/src/r4300/new_dynarec/new_dynarec_64.o
# collect2: error: ld returned 1 exit status
"aarch64-linux"
];
};
}

View File

@@ -0,0 +1,61 @@
diff --git a/src/emu/cpu/m6502/m6502make.py b/src/emu/cpu/m6502/m6502make.py
index da29fc722a..3de641dd69 100755
--- a/src/emu/cpu/m6502/m6502make.py
+++ b/src/emu/cpu/m6502/m6502make.py
@@ -16,7 +16,7 @@ def load_opcodes(fname):
opcodes = []
logging.info("load_opcodes: %s", fname)
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
logging.error("cannot read opcodes file %s [%s]", fname, err)
@@ -39,7 +39,7 @@ def load_disp(fname):
logging.info("load_disp: %s", fname)
states = []
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
logging.error("cannot read display file %s [%s]", fname, err)
diff --git a/src/emu/cpu/m6809/m6809make.py b/src/emu/cpu/m6809/m6809make.py
index c3d5b0f66e..79f6f90cdd 100644
--- a/src/emu/cpu/m6809/m6809make.py
+++ b/src/emu/cpu/m6809/m6809make.py
@@ -14,7 +14,7 @@ def load_file(fname, lines):
if path != "":
path += '/'
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
sys.stderr.write("Cannot read opcodes file %s [%s]\n" % (fname, err))
diff --git a/src/emu/cpu/mcs96/mcs96make.py b/src/emu/cpu/mcs96/mcs96make.py
index ec5ec37a78..7ab806a653 100644
--- a/src/emu/cpu/mcs96/mcs96make.py
+++ b/src/emu/cpu/mcs96/mcs96make.py
@@ -71,7 +71,7 @@ def __init__(self, fname, is_196):
self.ea = {}
self.macros = {}
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
sys.stderr.write("Cannot read opcodes file %s [%s]\n" % (fname, err))
diff --git a/src/emu/cpu/tms57002/tmsmake.py b/src/emu/cpu/tms57002/tmsmake.py
index 62092097d9..78f9fe43cd 100755
--- a/src/emu/cpu/tms57002/tmsmake.py
+++ b/src/emu/cpu/tms57002/tmsmake.py
@@ -326,7 +326,7 @@ def ins_cmp_dasm(a, b):
def LoadLst(filename):
instructions = []
ins = None
- for n, line in enumerate(open(filename, "rU")):
+ for n, line in enumerate(open(filename, "r")):
line = line.rstrip()
if not line and ins:
# new lines separate intructions

View File

@@ -0,0 +1,74 @@
diff --git a/scripts/build/verinfo.py b/scripts/build/verinfo.py
index a73d8ad268..82a80c0984 100644
--- a/scripts/build/verinfo.py
+++ b/scripts/build/verinfo.py
@@ -63,7 +63,7 @@ def extract_version(input):
build, outfmt, srcfile, dstfile = parse_args()
try:
- fp = open(srcfile, 'rU')
+ fp = open(srcfile, 'r')
except IOError:
sys.stderr.write("Unable to open source file '%s'\n" % srcfile)
sys.exit(1)
diff --git a/src/devices/cpu/m6502/m6502make.py b/src/devices/cpu/m6502/m6502make.py
index 8bcd85f8e2..557b175966 100755
--- a/src/devices/cpu/m6502/m6502make.py
+++ b/src/devices/cpu/m6502/m6502make.py
@@ -18,7 +18,7 @@ def load_opcodes(fname):
opcodes = []
logging.info("load_opcodes: %s", fname)
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
logging.error("cannot read opcodes file %s [%s]", fname, err)
@@ -41,7 +41,7 @@ def load_disp(fname):
logging.info("load_disp: %s", fname)
states = []
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
logging.error("cannot read display file %s [%s]", fname, err)
diff --git a/src/devices/cpu/m6809/m6809make.py b/src/devices/cpu/m6809/m6809make.py
index 8838b96019..e1ea25db06 100644
--- a/src/devices/cpu/m6809/m6809make.py
+++ b/src/devices/cpu/m6809/m6809make.py
@@ -16,7 +16,7 @@ def load_file(fname, lines):
if path != "":
path += '/'
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
sys.stderr.write("Cannot read opcodes file %s [%s]\n" % (fname, err))
diff --git a/src/devices/cpu/mcs96/mcs96make.py b/src/devices/cpu/mcs96/mcs96make.py
index b4844942e3..207208d2b6 100644
--- a/src/devices/cpu/mcs96/mcs96make.py
+++ b/src/devices/cpu/mcs96/mcs96make.py
@@ -73,7 +73,7 @@ def __init__(self, fname, is_196):
self.ea = {}
self.macros = {}
try:
- f = open(fname, "rU")
+ f = open(fname, "r")
except Exception:
err = sys.exc_info()[1]
sys.stderr.write("Cannot read opcodes file %s [%s]\n" % (fname, err))
diff --git a/src/devices/cpu/tms57002/tmsmake.py b/src/devices/cpu/tms57002/tmsmake.py
index e2e12b5a4b..942ec09537 100755
--- a/src/devices/cpu/tms57002/tmsmake.py
+++ b/src/devices/cpu/tms57002/tmsmake.py
@@ -323,7 +323,7 @@ def AddInfo(self, line):
def LoadLst(filename):
instructions = []
ins = None
- for n, line in enumerate(open(filename, "rU")):
+ for n, line in enumerate(open(filename, "r")):
line = line.rstrip()
if not line and ins:
# new lines separate intructions

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "pcsx-rearmed";
version = "0-unstable-2025-08-16";
src = fetchFromGitHub {
owner = "libretro";
repo = "pcsx_rearmed";
rev = "228c14e10e9a8fae0ead8adf30daad2cdd8655b9";
hash = "sha256-89/1axjha8Pv2MVWIr1P3TGq43HwhHeUZRUHkes52tk=";
};
dontConfigure = true;
meta = {
description = "Port of PCSX ReARMed to libretro";
homepage = "https://github.com/libretro/pcsx_rearmed";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
cmake,
fetchFromGitHub,
libGL,
libGLU,
mkLibretroCore,
perl,
pkg-config,
xz,
}:
mkLibretroCore {
core = "pcsx2";
version = "0-unstable-2025-09-29";
src = fetchFromGitHub {
owner = "libretro";
repo = "ps2";
rev = "9485a53fa5aa2bff17e04518116107f81a8c82e3";
hash = "sha256-xkRPESbLNX9AFOIdEA9iW4Xn7hdJXfdi+TEbegC8KXA=";
fetchSubmodules = true;
};
extraNativeBuildInputs = [
cmake
pkg-config
];
extraBuildInputs = [
libGL
libGLU
perl
xz
];
cmakeFlags = with lib.strings; [
# Workaround the following error:
# > CMake Error at 3rdparty/libzip/libzip/CMakeLists.txt:1 (cmake_minimum_required):
# > Compatibility with CMake < 3.5 has been removed from CMake.
#
# > Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
# > to tell CMake that the project requires at least <min> but has been updated
# > to work with policies introduced by <max> or earlier.
#
# > Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
(cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
# Explicitly set ARCH_FLAG to avoid -march=native
# https://github.com/libretro/ps2/blob/9485a53fa5aa2bff17e04518116107f81a8c82e3/cmake/BuildParameters.cmake#L106-L117
(cmakeFeature "ARCH_FLAG" "-msse4.1")
];
makefile = "Makefile";
preInstall = "cd bin";
meta = {
description = "Port of PCSX2 to libretro";
homepage = "https://github.com/libretro/ps2";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.x86;
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "picodrive";
version = "0-unstable-2025-05-31";
src = fetchFromGitHub {
owner = "libretro";
repo = "picodrive";
rev = "975cdafb613e84e305f87b43e70d1e19df7e60e0";
hash = "sha256-hRM3DtaTVz35QEkUrPoNXHdS7TgazWIFKU1e+jjfigg=";
fetchSubmodules = true;
};
dontConfigure = true;
meta = {
description = "Fast MegaDrive/MegaCD/32X emulator";
homepage = "https://github.com/libretro/picodrive";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
boost,
bzip2,
cmake,
curl,
fetchFromGitHub,
icu,
libGL,
libGLU,
mkLibretroCore,
openssl,
xorg,
}:
mkLibretroCore {
core = "play";
version = "0-unstable-2025-09-22";
src = fetchFromGitHub {
owner = "jpd002";
repo = "Play-";
rev = "a3d84f977b721cda752299739fec525addce1ef9";
hash = "sha256-NVuz52c0zt/c8b3uoJWpKO2TMM9PFh/thQt8CfRFZhk=";
fetchSubmodules = true;
};
extraBuildInputs = [
boost
bzip2
curl
openssl
icu
libGL
libGLU
xorg.libX11
];
extraNativeBuildInputs = [ cmake ];
makefile = "Makefile";
cmakeFlags = [
"-DBUILD_PLAY=OFF"
"-DBUILD_LIBRETRO_CORE=ON"
];
postBuild = "cd Source/ui_libretro";
# FIXME: workaround the following GCC 13 error:
# error: 'printf' was not declared in this scop
env.CXXFLAGS = "-include cstdio";
meta = {
description = "Port of Play! to libretro";
homepage = "https://github.com/jpd002/Play-";
license = lib.licenses.bsd2;
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
cmake,
fetchFromGitHub,
libGL,
libGLU,
libzip,
mkLibretroCore,
pkg-config,
python3,
snappy,
xorg,
}:
mkLibretroCore {
core = "ppsspp";
version = "0-unstable-2025-09-30";
src = fetchFromGitHub {
owner = "hrydgard";
repo = "ppsspp";
rev = "2f4b1adc98d36a4d3fdd0a413d65a7a0b306ed4c";
hash = "sha256-9azuw2uCwc1cpqnrqCBGp4uS2AHOc2gBJIaOTSullvs=";
fetchSubmodules = true;
};
extraNativeBuildInputs = [
cmake
pkg-config
python3
];
extraBuildInputs = [
libGLU
libGL
libzip
snappy
xorg.libX11
];
makefile = "Makefile";
cmakeFlags = [
"-DLIBRETRO=ON"
# USE_SYSTEM_FFMPEG=ON causes several glitches during video playback
# See: https://github.com/NixOS/nixpkgs/issues/304616
"-DUSE_SYSTEM_FFMPEG=OFF"
"-DUSE_SYSTEM_SNAPPY=ON"
"-DUSE_SYSTEM_LIBZIP=ON"
"-DOpenGL_GL_PREFERENCE=GLVND"
];
postBuild = "cd lib";
meta = {
description = "PPSSPP libretro port";
homepage = "https://github.com/hrydgard/ppsspp";
license = lib.licenses.gpl2Plus;
badPlatforms = [
# error: cannot convert 'uint32x4_t' to 'int' in initialization
"aarch64-linux"
];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "prboom";
version = "0-unstable-2024-12-27";
src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-prboom";
rev = "b3e5f8b2e8855f9c6fc7ff7a0036e4e61379177d";
hash = "sha256-FtPn54s/QUu8fjeUBaAQMZ6EWAixV+gawuCv2eM+qrs=";
};
makefile = "Makefile";
meta = {
description = "Prboom libretro port";
homepage = "https://github.com/libretro/libretro-prboom";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "prosystem";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "prosystem-libretro";
rev = "acae250da8d98b8b9707cd499e2a0bf6d8500652";
hash = "sha256-AGF3K3meZEEsnzHmMTCsFXBGNvWVELH8a8qET07kP0o=";
};
makefile = "Makefile";
meta = {
description = "Port of ProSystem to libretro";
homepage = "https://github.com/libretro/prosystem-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "puae";
version = "0-unstable-2025-08-19";
src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-uae";
rev = "9e2aa770a9b6b0a4e1f4fc05eb0db6c8e7aba8ee";
hash = "sha256-YTS0OgYJCGawpsDHvU79dDA+iePna5Fcab2Le3vdVSk=";
};
makefile = "Makefile";
meta = {
description = "Amiga emulator based on WinUAE";
homepage = "https://github.com/libretro/libretro-uae";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "quicknes";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "QuickNES_Core";
rev = "dbf19f73e3eb9701d1c7f5898f57c097e05c9fbd";
hash = "sha256-oFQUMp1imc8JCsQYCy1BtIUmTC+u0VcoYHpWzUpKNb4=";
};
makefile = "Makefile";
meta = {
description = "QuickNES libretro port";
homepage = "https://github.com/libretro/QuickNES_Core";
license = lib.licenses.lgpl21Plus;
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
alsa-lib,
fetchFromGitHub,
fetchpatch2,
libGL,
libGLU,
mkLibretroCore,
portaudio,
python3,
xorg,
}:
mkLibretroCore {
core = "same_cdi";
version = "0-unstable-2025-01-31";
src = fetchFromGitHub {
owner = "libretro";
repo = "same_cdi";
rev = "7ee1d8e9cb4307b7cd44ee1dd757e9b3f48f41d5";
hash = "sha256-EGE3NuO0gpZ8MKPypH8rFwJiv4QsdKuIyLKVuKTcvws=";
};
patches = [
(fetchpatch2 {
# https://github.com/libretro/same_cdi/pull/19
name = "Fixes_compilation_errors_as_per_issue_9.patch";
url = "https://github.com/libretro/same_cdi/commit/bf3212315546cdd514118a4f3ea764fd9c401091.patch?full_index=1";
hash = "sha256-1vrMxnRtEWUt+6I/4PSfCPDIUAGKkXFd2UVr9473ngo=";
})
];
extraNativeBuildInputs = [ python3 ];
extraBuildInputs = [
alsa-lib
libGL
libGLU
portaudio
xorg.libX11
];
meta = {
description = "SAME_CDI is a libretro core to play CD-i games";
homepage = "https://github.com/libretro/same_cdi";
license = with lib.licenses; [
bsd3
gpl2Plus
];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
hexdump,
mkLibretroCore,
which,
}:
mkLibretroCore {
core = "sameboy";
version = "0-unstable-2024-06-28";
src = fetchFromGitHub {
owner = "libretro";
repo = "sameboy";
rev = "51433012a871a44555492273fd22f29867d12655";
hash = "sha256-vPT2uRGbXmJ62yig/yk485/TxEEKHJeWdNrM2c0IjKw=";
};
extraNativeBuildInputs = [
which
hexdump
];
preBuild = "cd libretro";
makefile = "Makefile";
meta = {
description = "QuickNES libretro port";
homepage = "https://github.com/libretro/QuickNES_Core";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
fetchFromGitHub,
libGL,
libGLU,
which,
zip,
mkLibretroCore,
}:
let
# https://github.com/libretro/scummvm/blob/master/backends/platform/libretro/dependencies.mk#L8-L14
libretro-common-src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-common";
rev = "70ed90c42ddea828f53dd1b984c6443ddb39dbd6";
hash = "sha256-ItsUNbJCK/m/3VprK/zHD2UF5MhPC8b7jM3qS/oHU2A=";
};
libretro-deps-src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-deps";
rev = "abf5246b016569759e7d1b0ea91bb98c2e34d160";
hash = "sha256-tdGytbSNMCfMuXIAUunOSVw9qFq2rRaruELhZwEmhWE=";
};
in
mkLibretroCore {
core = "scummvm";
version = "0-unstable-2025-07-03";
src = fetchFromGitHub {
owner = "libretro";
repo = "scummvm";
rev = "686cdd13719b92554fa46b264c512ca7deec7a96";
hash = "sha256-3w1rYVPX7ENGUgKdrFRQShWoEXfagxdtzd98m1hKeYU=";
};
extraBuildInputs = [
libGL
libGLU
zip
];
extraNativeBuildInputs = [ which ];
preConfigure = "cd backends/platform/libretro";
preBuild = ''
mkdir -p deps/libretro-{common,deps}
cp -a ${libretro-common-src}/* deps/libretro-common
cp -a ${libretro-deps-src}/* deps/libretro-deps
chmod -R u+w deps/
patchShebangs ./scripts/*
'';
makefile = "Makefile";
meta = {
description = "Libretro port of ScummVM";
homepage = "https://github.com/libretro/scummvm";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "smsplus";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "smsplus-gx";
rev = "c642bbd0680b5959180a420036108893d0aec961";
hash = "sha256-SHBrwzLyVZ4Tp/kVCnr4xj2B3pmdg+JUmZUM7hYao64=";
};
meta = {
description = "SMS Plus GX libretro port";
homepage = "https://github.com/libretro/smsplus-gx";
license = lib.licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "snes9x";
version = "0-unstable-2025-09-24";
src = fetchFromGitHub {
owner = "snes9xgit";
repo = "snes9x";
rev = "94115094ead4da7342bd638bb4cc293ae7d297c0";
hash = "sha256-tXSQursZcV/gsLlydVRD1KUR8t2zztfby7cDno1xtHc=";
};
makefile = "Makefile";
preBuild = "cd libretro";
meta = {
description = "Port of SNES9x git to libretro";
homepage = "https://github.com/snes9xgit/snes9x";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "snes9x2002";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "snes9x2002";
rev = "a0709ec7dcd6de2fbebb43106bd757b649e3b7cf";
hash = "sha256-rrMPhXIsQ48fVvjgZgC3xeqm9k9kwe43oZNzs2d/h1Q=";
};
makefile = "Makefile";
meta = {
description = "Optimized port/rewrite of SNES9x 1.39 to Libretro";
homepage = "https://github.com/libretro/snes9x2002";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
withBlarggAPU ? false,
}:
mkLibretroCore {
core = "snes9x2005" + lib.optionalString withBlarggAPU "-plus";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "snes9x2005";
rev = "74d871db9b4dba6dbe6c5ecebc88cbf255be5349";
hash = "sha256-YlRMjSEo9sdLVRzWGSJlnBeqg6wUhZi8l3ffzUaKQIQ=";
};
makefile = "Makefile";
makeFlags = lib.optionals withBlarggAPU [ "USE_BLARGG_APU=1" ];
meta = {
description = "Optimized port/rewrite of SNES9x 1.43 to Libretro";
homepage = "https://github.com/libretro/snes9x2005";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore rec {
core = "snes9x2010";
version = "0-unstable-2024-11-19";
src = fetchFromGitHub {
owner = "libretro";
repo = "snes9x2010";
rev = "f9ae8fd28b13070a945a829ccf41cbf90a21d0f7";
hash = "sha256-nsExAYnzDenPvXzeN60jGykRTrCGMi/mRPV+vgS8ZtE=";
};
makeFlags = [ "GIT_VERSION=${builtins.substring 0 7 src.rev}" ];
meta = {
description = "Optimized port/rewrite of SNES9x 1.52+ to Libretro";
homepage = "https://github.com/libretro/snes9x2010";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "stella";
version = "0-unstable-2025-08-28";
src = fetchFromGitHub {
owner = "stella-emu";
repo = "stella";
rev = "749a21f653cf85fcedf4fe514ac8df1ad308be8e";
hash = "sha256-N5E+Ci6cTvG9/Yqg5NdPZB00ThNKc6SS7qCWlmCYd6I=";
};
makefile = "Makefile";
preBuild = "cd src/os/libretro";
dontConfigure = true;
meta = {
description = "Port of Stella to libretro";
homepage = "https://github.com/stella-emu/stella";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "stella2014";
version = "0-unstable-2024-10-21";
src = fetchFromGitHub {
owner = "libretro";
repo = "stella2014-libretro";
rev = "3cc89f0d316d6c924a5e3f4011d17421df58e615";
hash = "sha256-2gnFWau7F45SdzoqDUlqYXfXVE1EUPozHZv7BhyRRIA=";
};
makefile = "Makefile";
meta = {
description = "Port of Stella ~2014 to libretro";
homepage = "https://github.com/libretro/stella2014-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
cmake,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "swanstation";
version = "0-unstable-2025-08-02";
src = fetchFromGitHub {
owner = "libretro";
repo = "swanstation";
rev = "4d309c05fd7bdc503d91d267bd542edb8d192b09";
hash = "sha256-v51xgsyVtyipss0VWqMTI69MLTJ4Eb37hJfbQfid/0Q=";
};
extraNativeBuildInputs = [ cmake ];
makefile = "Makefile";
cmakeFlags = [
"-DBUILD_LIBRETRO_CORE=ON"
];
meta = {
description = "Port of SwanStation (a fork of DuckStation) to libretro";
homepage = "https://github.com/libretro/swanstation";
license = lib.licenses.gpl3Only;
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "tgbdual";
version = "0-unstable-2025-05-10";
src = fetchFromGitHub {
owner = "libretro";
repo = "tgbdual-libretro";
rev = "933707c0ba8f12360f6d79712f735a917713709a";
hash = "sha256-58OLuF14aSJGhmXR0RGgPpuHLXYk9LOz7LX03AEFPr4=";
};
makefile = "Makefile";
meta = {
description = "Port of TGBDual to libretro";
homepage = "https://github.com/libretro/tgbdual-libretro";
license = lib.licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
cmake,
fetchFromGitHub,
mkLibretroCore,
}:
mkLibretroCore {
core = "thepowdertoy";
version = "0-unstable-2025-09-16";
src = fetchFromGitHub {
owner = "libretro";
repo = "ThePowderToy";
rev = "cb3cd4c2e5beddb98b34e6b800fa24e8f96322d9";
hash = "sha256-k3XWkkSuQC3IBhhI96qkTrlGH/oJu941HaAvR28V5i0=";
};
extraNativeBuildInputs = [ cmake ];
makefile = "Makefile";
postBuild = "cd src";
meta = {
description = "Port of The Powder Toy to libretro";
homepage = "https://github.com/libretro/ThePowderToy";
license = lib.licenses.gpl3Only;
};
}

Some files were not shown because too many files have changed in this diff Show More