diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix index 6251203607a3..fe798e939a52 100644 --- a/maintainers/team-list.nix +++ b/maintainers/team-list.nix @@ -575,6 +575,7 @@ with lib.maintainers; members = [ aanderse edwtjo + hrdinka thiagokokada ]; scope = "Maintain Libretro, RetroArch and related packages."; diff --git a/pkgs/applications/emulators/retroarch/README.md b/pkgs/applications/emulators/retroarch/README.md index 74b600e069bd..1a1fec0ed1d1 100644 --- a/pkgs/applications/emulators/retroarch/README.md +++ b/pkgs/applications/emulators/retroarch/README.md @@ -1,46 +1,16 @@ -# RetroArch +# Libretro -This directory includes [RetroArch](https://www.retroarch.com/), [libretro -cores](https://docs.libretro.com/guides/core-list/) and related packages. +[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 the core repository to [update_cores.py](./update_cores.py) inside the - `CORES` map. - - The minimum required parameter is `repo` - - If the repository owner is not `libretro`, set `owner` parameter - - If the core needs submodules, set `fetch_submodules` parameter to `True` - - To pin the core to a specific release, set `rev` parameter -2. Run `./pkgs/applications/emulators/retroarch/update_cores.py ` to - generate [`hashes.json`](./hashes.json) file -3. Add your new core to [`cores.nix`](./cores.nix) file, using - [`mkLibretroCore`](./mkLibretroCore.nix) function - - In general, the attribute name should be the same as the repo name, unless - there is a good reason not to - - Check the core repo and [Libretro - documentation](https://docs.libretro.com/) for the core you're trying to add - for instructions on how to build - - Also check the examples inside [`cores.nix`](./cores.nix) - - If your core is recently released, there is a good chance that you may - need to update [`libretro-core-info`](./libretro-core-info.nix) for things - to work inside RetroArch -4. Try to build your core with `nix-build -A libretro.` - -## Updating cores - -Just run: - -```console -# From the root of your nixpkgs directory -./pkgs/applications/emulators/retroarch/update_cores.nix -``` - -Keep in mind that because of the huge amount of cores that we package here, it -is recommended to set `GITHUB_TOKEN` to your GitHub's [Personal Access -Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) -(PAT), otherwise the update will probably fail due to GitHub's API rate limit. +1. Add a new core using `mkLibretroCore` function (use one of the existing + files 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.` ## Using RetroArch with cores diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index f30d55ee4395..61097042e33f 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -1,1171 +1,196 @@ -{ lib -, stdenv -, gcc12Stdenv -, alsa-lib -, boost -, bzip2 -, cmake -, curl -, fetchFromGitHub -, fetchpatch -, ffmpeg_6 -, fluidsynth -, fmt -, freetype -, gettext -, harfbuzz -, hexdump -, hidapi -, icu -, libaio -, libevdev -, libGL -, libGLU -, libjpeg -, liblcf -, libpcap -, libpng -, libsndfile -, libvorbis -, libxml2 -, libxmp -, libzip -, makeWrapper -, mpg123 -, nasm -, openssl -, opusfile -, pcre -, pixman -, pkg-config -, portaudio -, python3 -, retroarch -, sfml -, snappy -, speexdsp -, udev -, which -, xorg -, xxd -, xz -, zlib +{ + lib, + newScope, + fetchFromGitHub, }: -let - hashesFile = lib.importJSON ./hashes.json; - - getCore = repo: (lib.getAttr repo hashesFile); - - getCoreSrc = repo: - let - inherit (getCore repo) src fetcher; - fetcherFn = { - inherit fetchFromGitHub; - }.${fetcher} or (throw "Unknown fetcher: ${fetcher}"); - in - fetcherFn src; - - getCoreVersion = repo: (getCore repo).version; - - mkLibretroCore = - # Sometimes core name != repo name, so you may need to set them differently - # when necessary: - # - core: used by the resulting core library name, e.g.: - # `${core}_libretro.so`. Needs to match their respectful core info file - # (see https://github.com/libretro/libretro-core-info/) - # - repo: the repository name on GitHub - # See `update_cores.py` for instruction on how to add a new core. - { core - , repo ? core - , src ? (getCoreSrc repo) - , version ? (getCoreVersion repo) - , ... - }@args: - import ./mkLibretroCore.nix ({ - inherit lib stdenv core repo src version makeWrapper retroarch zlib; - } // args); -in -{ - inherit mkLibretroCore; - - atari800 = mkLibretroCore { - core = "atari800"; - makefile = "Makefile"; - makeFlags = [ "GIT_VERSION=" ]; - meta = { - description = "Port of Atari800 to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-gba = mkLibretroCore { - core = "mednafen-gba"; - repo = "beetle-gba"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's GameBoy Advance core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-lynx = mkLibretroCore { - core = "mednafen-lynx"; - repo = "beetle-lynx"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's Lynx core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-ngp = mkLibretroCore { - core = "mednafen-ngp"; - repo = "beetle-ngp"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's NeoGeo Pocket core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-pce = mkLibretroCore { - core = "mednafen-pce"; - repo = "beetle-pce"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's PC Engine core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-pce-fast = mkLibretroCore { - core = "mednafen-pce-fast"; - repo = "beetle-pce-fast"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's PC Engine fast core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-pcfx = mkLibretroCore { - core = "mednafen-pcfx"; - repo = "beetle-pcfx"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's PCFX core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-psx = mkLibretroCore { - core = "mednafen-psx"; - repo = "beetle-psx"; - makefile = "Makefile"; - makeFlags = [ "HAVE_HW=0" "HAVE_LIGHTREC=1" ]; - meta = { - description = "Port of Mednafen's PSX Engine core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-psx-hw = mkLibretroCore { - core = "mednafen-psx-hw"; - repo = "beetle-psx"; - extraBuildInputs = [ libGL libGLU ]; - makefile = "Makefile"; - makeFlags = [ "HAVE_VULKAN=1" "HAVE_OPENGL=1" "HAVE_HW=1" "HAVE_LIGHTREC=1" ]; - meta = { - description = "Port of Mednafen's PSX Engine (with HW accel) core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-saturn = mkLibretroCore { - core = "mednafen-saturn"; - repo = "beetle-saturn"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's Saturn core to libretro"; - license = lib.licenses.gpl2Only; - platforms = [ "aarch64-linux" "x86_64-linux" ]; - }; - }; - - beetle-supafaust = mkLibretroCore { - core = "mednafen-supafaust"; - repo = "beetle-supafaust"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's experimental snes_faust core to libretro"; - license = lib.licenses.gpl2Plus; - }; - }; - - beetle-supergrafx = mkLibretroCore { - core = "mednafen-supergrafx"; - repo = "beetle-supergrafx"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's SuperGrafx core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-vb = mkLibretroCore { - core = "mednafen-vb"; - repo = "beetle-vb"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's VirtualBoy core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - beetle-wswan = mkLibretroCore { - core = "mednafen-wswan"; - repo = "beetle-wswan"; - makefile = "Makefile"; - meta = { - description = "Port of Mednafen's WonderSwan core to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - blastem = mkLibretroCore { - core = "blastem"; - meta = { - description = "Port of BlastEm to libretro"; - license = lib.licenses.gpl3Only; - platforms = lib.platforms.x86; - }; - }; - - bluemsx = mkLibretroCore { - core = "bluemsx"; - meta = { - description = "Port of BlueMSX to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - bsnes = mkLibretroCore { - core = "bsnes"; - makefile = "Makefile"; - meta = { - description = "Port of bsnes to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - bsnes-hd = mkLibretroCore { - core = "bsnes-hd-beta"; - repo = "bsnes-hd"; - makefile = "GNUmakefile"; - makeFlags = - let - # linux = bsd - # https://github.com/DerKoun/bsnes-hd/blob/f0b6cf34e9780d53516977ed2de64137a8bcc3c5/bsnes/GNUmakefile#L37 - platform = if stdenv.hostPlatform.isDarwin then "macos" else "linux"; - in - [ - "-C" - "bsnes" - "target=libretro" - "platform=${platform}" - ]; - extraBuildInputs = [ xorg.libX11 xorg.libXext ]; - postBuild = "cd bsnes/out"; - meta = { - description = "Port of bsnes-hd to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - bsnes-mercury = mkLibretroCore { - core = "bsnes-mercury-accuracy"; - repo = "bsnes-mercury"; - makefile = "Makefile"; - makeFlags = [ "PROFILE=accuracy" ]; - meta = { - description = "Fork of bsnes with HLE DSP emulation restored (accuracy profile)"; - license = lib.licenses.gpl3Only; - }; - }; - - bsnes-mercury-balanced = mkLibretroCore { - core = "bsnes-mercury-balanced"; - repo = "bsnes-mercury"; - makefile = "Makefile"; - makeFlags = [ "PROFILE=balanced" ]; - meta = { - description = "Fork of bsnes with HLE DSP emulation restored (balanced profile)"; - license = lib.licenses.gpl3Only; - }; - }; - - bsnes-mercury-performance = mkLibretroCore { - core = "bsnes-mercury-performance"; - repo = "bsnes-mercury"; - makefile = "Makefile"; - makeFlags = [ "PROFILE=performance" ]; - meta = { - description = "Fork of bsnes with HLE DSP emulation restored (performance profile)"; - license = lib.licenses.gpl3Only; - }; - }; - - citra = mkLibretroCore rec { - core = "citra"; - extraBuildInputs = [ libGLU libGL boost ffmpeg_6 nasm ]; - makefile = "Makefile"; - makeFlags = [ - "HAVE_FFMPEG_STATIC=0" - # https://github.com/libretro/citra/blob/1a66174355b5ed948de48ef13c0ed508b6d6169f/Makefile#L87-L90 - "GIT_REV=${(getCoreSrc core).rev}" - "GIT_DESC=${lib.substring 0 8 (getCoreSrc core).rev}" - "GIT_BRANCH=master" - "BUILD_DATE=01/01/1970_00:00" - ]; - # FIXME: build fail with GCC13: - # error: 'mic_device_name' has incomplete type - stdenv = gcc12Stdenv; - meta = { - description = "Port of Citra to libretro"; - license = lib.licenses.gpl2Plus; - }; - }; - - desmume = mkLibretroCore { - core = "desmume"; - preBuild = "cd desmume/src/frontend/libretro"; - extraBuildInputs = [ libpcap libGLU libGL xorg.libX11 ]; - makeFlags = lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix" - ++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0"; - meta = { - description = "Port of DeSmuME to libretro"; - license = lib.licenses.gpl2Plus; - }; - }; - - desmume2015 = mkLibretroCore { - core = "desmume2015"; - 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"; - license = lib.licenses.gpl2Plus; - }; - }; - - dolphin = mkLibretroCore { - core = "dolphin"; - extraNativeBuildInputs = [ cmake curl pkg-config ]; - extraBuildInputs = [ - libGLU - libGL - pcre - sfml - gettext - hidapi - libevdev - udev - ] ++ (with xorg; [ libSM libX11 libXi libpthreadstubs libxcb xcbutil libXext libXrandr libXinerama libXxf86vm ]); - 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"; - license = lib.licenses.gpl2Plus; - }; - }; - - dosbox = mkLibretroCore { - core = "dosbox"; - CXXFLAGS = "-std=gnu++11"; - meta = { - description = "Port of DOSBox to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - dosbox-pure = mkLibretroCore { - core = "dosbox-pure"; - CXXFLAGS = "-std=gnu++11"; - hardeningDisable = [ "format" ]; - makefile = "Makefile"; - meta = { - description = "Port of DOSBox to libretro aiming for simplicity and ease of use"; - license = lib.licenses.gpl2Only; - }; - }; - - easyrpg = mkLibretroCore { - core = "easyrpg"; - extraNativeBuildInputs = [ cmake pkg-config ]; - extraBuildInputs = [ fmt freetype harfbuzz liblcf libpng libsndfile libvorbis libxmp mpg123 opusfile pcre pixman speexdsp ]; - patches = [ - # The following patch is shared with easyrpg-player. - # Update when new versions of liblcf and easyrpg-player are released. - # See pkgs/games/easyrpg-player/default.nix for details. - (fetchpatch { - name = "0001-Fix-building-with-fmtlib-10.patch"; - url = "https://github.com/EasyRPG/Player/commit/ab6286f6d01bada649ea52d1f0881dde7db7e0cf.patch"; - hash = "sha256-GdSdVFEG1OJCdf2ZIzTP+hSrz+ddhTMBvOPjvYQHy54="; - }) - ]; - cmakeFlags = [ - "-DBUILD_SHARED_LIBS=ON" - "-DPLAYER_TARGET_PLATFORM=libretro" - "-DCMAKE_INSTALL_DATADIR=${placeholder "out"}/share" - ]; - makefile = "Makefile"; - meta = { - description = "EasyRPG Player libretro port"; - license = lib.licenses.gpl3Only; - }; - }; - - eightyone = mkLibretroCore { - core = "81"; - repo = "eightyone"; - meta = { - description = "Port of EightyOne to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - fbalpha2012 = mkLibretroCore { - core = "fbalpha2012"; - makefile = "makefile.libretro"; - preBuild = "cd svn-current/trunk"; - meta = { - description = "Port of Final Burn Alpha ~2012 to libretro"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - fbneo = mkLibretroCore { - core = "fbneo"; - makefile = "Makefile"; - preBuild = "cd src/burner/libretro"; - meta = { - description = "Port of FBNeo to libretro"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - fceumm = mkLibretroCore { - core = "fceumm"; - meta = { - description = "FCEUmm libretro port"; - license = lib.licenses.gpl2Only; - }; - }; - - flycast = mkLibretroCore { - core = "flycast"; - extraNativeBuildInputs = [ cmake ]; - extraBuildInputs = [ libGL libGLU ]; - cmakeFlags = [ "-DLIBRETRO=ON" ]; - makefile = "Makefile"; - meta = { - description = "Flycast libretro port"; - license = lib.licenses.gpl2Only; - platforms = [ "aarch64-linux" "x86_64-linux" ]; - }; - }; - - fmsx = mkLibretroCore { - core = "fmsx"; - makefile = "Makefile"; - meta = { - description = "FMSX libretro port"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - freeintv = mkLibretroCore { - core = "freeintv"; - makefile = "Makefile"; - meta = { - description = "FreeIntv libretro port"; - license = lib.licenses.gpl3Only; - }; - }; - - fuse = mkLibretroCore { - core = "fuse"; - meta = { - description = "Port of the Fuse Unix Spectrum Emulator to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - gambatte = mkLibretroCore { - core = "gambatte"; - meta = { - description = "Gambatte libretro port"; - license = lib.licenses.gpl2Only; - }; - }; - - genesis-plus-gx = mkLibretroCore { - core = "genesis-plus-gx"; - meta = { - description = "Enhanced Genesis Plus libretro port"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - gpsp = mkLibretroCore { - core = "gpsp"; - makefile = "Makefile"; - meta = { - description = "Port of gpSP to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - gw = mkLibretroCore { - core = "gw"; - makefile = "Makefile"; - meta = { - description = "Port of Game and Watch to libretro"; - license = lib.licenses.zlib; - }; - }; - - handy = mkLibretroCore { - core = "handy"; - makefile = "Makefile"; - meta = { - description = "Port of Handy to libretro"; - license = lib.licenses.zlib; - }; - }; - - hatari = mkLibretroCore { - core = "hatari"; - extraNativeBuildInputs = [ which ]; - dontConfigure = true; - # zlib is already included in mkLibretroCore as buildInputs - makeFlags = [ "EXTERNAL_ZLIB=1" ]; - meta = { - description = "Port of Hatari to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - mame = mkLibretroCore { - core = "mame"; - 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"; - license = with lib.licenses; [ bsd3 gpl2Plus ]; - }; - }; - - mame2000 = mkLibretroCore { - core = "mame2000"; - 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"; - # MAME license, non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - mame2003 = mkLibretroCore { - core = "mame2003"; - makefile = "Makefile"; - meta = { - description = "Port of MAME ~2003 to libretro, compatible with MAME 0.78 sets"; - # MAME license, non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - mame2003-plus = mkLibretroCore { - core = "mame2003-plus"; - makefile = "Makefile"; - meta = { - description = "Port of MAME ~2003+ to libretro, compatible with MAME 0.78 sets"; - # MAME license, non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - mame2010 = mkLibretroCore { - core = "mame2010"; - 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"; - # MAME license, non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - mame2015 = mkLibretroCore { - core = "mame2015"; - 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"; - # MAME license, non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - mame2016 = mkLibretroCore { - core = "mame2016"; - patches = [ ./patches/mame2016-python311.patch ]; - extraNativeBuildInputs = [ python3 ]; - extraBuildInputs = [ alsa-lib ]; - makeFlags = [ "PYTHON_EXECUTABLE=python3" ]; - # Build failures when this is set to a bigger number - NIX_BUILD_CORES = 8; - # Fix build errors in GCC13 - NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive"; - meta = { - description = "Port of MAME ~2016 to libretro, compatible with MAME 0.174 sets"; - license = with lib.licenses; [ bsd3 gpl2Plus ]; - }; - }; - - melonds = mkLibretroCore { - core = "melonds"; - extraBuildInputs = [ libGL libGLU ]; - makefile = "Makefile"; - meta = { - description = "Port of MelonDS to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - mesen = mkLibretroCore { - core = "mesen"; - makefile = "Makefile"; - preBuild = "cd Libretro"; - meta = { - description = "Port of Mesen to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - mesen-s = mkLibretroCore { - core = "mesen-s"; - makefile = "Makefile"; - preBuild = "cd Libretro"; - normalizeCore = false; - meta = { - description = "Port of Mesen-S to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - meteor = mkLibretroCore { - core = "meteor"; - makefile = "Makefile"; - preBuild = "cd libretro"; - meta = { - description = "Port of Meteor to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - mgba = mkLibretroCore { - core = "mgba"; - meta = { - description = "Port of mGBA to libretro"; - license = lib.licenses.mpl20; - }; - }; - - mrboom = mkLibretroCore { - core = "mrboom"; - makefile = "Makefile"; - meta = { - description = "Port of Mr.Boom to libretro"; - license = lib.licenses.mit; - }; - }; - - mupen64plus = mkLibretroCore { - core = "mupen64plus-next"; - repo = "mupen64plus"; - extraBuildInputs = [ libGLU libGL libpng nasm 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, GL only"; - license = lib.licenses.gpl3Only; - }; - }; - - neocd = mkLibretroCore { - core = "neocd"; - makefile = "Makefile"; - meta = { - description = "NeoCD libretro port"; - license = lib.licenses.lgpl3Only; - }; - }; - - nestopia = mkLibretroCore { - core = "nestopia"; - makefile = "Makefile"; - preBuild = "cd libretro"; - meta = { - description = "Nestopia libretro port"; - license = lib.licenses.gpl2Only; - }; - }; - - nxengine = mkLibretroCore { - core = "nxengine"; - makefile = "Makefile"; - meta = { - description = "NXEngine libretro port"; - license = lib.licenses.gpl3Only; - }; - }; - - np2kai = mkLibretroCore rec { - core = "np2kai"; - makeFlags = [ - # See https://github.com/AZO234/NP2kai/tags - "NP2KAI_VERSION=rev.22" - "NP2KAI_HASH=${(getCoreSrc core).rev}" - ]; - preBuild = "cd sdl"; - meta = { - description = "Neko Project II kai libretro port"; - license = lib.licenses.mit; - }; - }; - - o2em = mkLibretroCore { - core = "o2em"; - makefile = "Makefile"; - meta = { - description = "Port of O2EM to libretro"; - license = lib.licenses.artistic1; - }; - }; - - opera = mkLibretroCore { - core = "opera"; - makefile = "Makefile"; - makeFlags = [ "CC_PREFIX=${stdenv.cc.targetPrefix}" ]; - meta = { - description = "Opera is a port of 4DO/libfreedo to libretro"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - parallel-n64 = mkLibretroCore { - core = "parallel-n64"; - 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"; - license = lib.licenses.gpl3Only; - }; - }; - - pcsx2 = mkLibretroCore { - core = "pcsx2"; - extraNativeBuildInputs = [ - cmake - gettext - pkg-config - ]; - extraBuildInputs = [ - libaio - libGL - libGLU - libpcap - libpng - libxml2 - xz - xxd - ]; - makefile = "Makefile"; - cmakeFlags = [ "-DLIBRETRO=ON" ]; - # remove ccache - postPatch = '' - substituteInPlace CMakeLists.txt --replace "ccache" "" - ''; - postBuild = "cd pcsx2"; - # causes redefinition of _FORTIFY_SOURCE - hardeningDisable = [ "fortify3" ]; - # FIXME: multiple build errors with GCC13. - # Unlikely to be fixed until we switch to libretro/pcsx2 that is a more - # up-to-date port (but still WIP). - stdenv = gcc12Stdenv; - meta = { - description = "Port of PCSX2 to libretro"; - license = lib.licenses.gpl3Plus; - platforms = lib.platforms.x86; - }; - }; - - pcsx-rearmed = mkLibretroCore { - core = "pcsx_rearmed"; - dontConfigure = true; - meta = { - description = "Port of PCSX ReARMed with GNU lightning to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - picodrive = mkLibretroCore { - core = "picodrive"; - dontConfigure = true; - meta = { - description = "Fast MegaDrive/MegaCD/32X emulator"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - play = mkLibretroCore { - core = "play"; - 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 - CXXFLAGS = "-include cstdio"; - meta = { - description = "Port of Play! to libretro"; - license = lib.licenses.bsd2; - }; - }; - - ppsspp = mkLibretroCore { - core = "ppsspp"; - 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"; - license = lib.licenses.gpl2Plus; - }; - }; - - prboom = mkLibretroCore { - core = "prboom"; - makefile = "Makefile"; - meta = { - description = "Prboom libretro port"; - license = lib.licenses.gpl2Only; - }; - }; - - prosystem = mkLibretroCore { - core = "prosystem"; - makefile = "Makefile"; - meta = { - description = "Port of ProSystem to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - puae = mkLibretroCore { - core = "puae"; - makefile = "Makefile"; - meta = { - description = "Amiga emulator based on WinUAE"; - license = lib.licenses.gpl2Only; - }; - }; - - quicknes = mkLibretroCore { - core = "quicknes"; - makefile = "Makefile"; - meta = { - description = "QuickNES libretro port"; - license = lib.licenses.lgpl21Plus; - }; - }; - - sameboy = mkLibretroCore { - core = "sameboy"; - extraNativeBuildInputs = [ which hexdump ]; - preBuild = "cd libretro"; - makefile = "Makefile"; - meta = { - description = "SameBoy libretro port"; - license = lib.licenses.mit; - }; - }; - - same_cdi = mkLibretroCore { - core = "same_cdi"; - extraNativeBuildInputs = [ python3 ]; - extraBuildInputs = [ alsa-lib libGLU libGL portaudio xorg.libX11 ]; - # FIXME: build fail with GCC13: - # error: 'uint8_t' in namespace 'std' does not name a type; did you mean 'wint_t'? - stdenv = gcc12Stdenv; - meta = { - description = "SAME_CDI is a libretro core to play CD-i games"; - license = with lib.licenses; [ bsd3 gpl2Plus ]; - }; - }; - - scummvm = mkLibretroCore { - core = "scummvm"; - extraBuildInputs = [ fluidsynth libjpeg libvorbis libGLU libGL ]; - makefile = "Makefile"; - preConfigure = "cd backends/platform/libretro/build"; - meta = { - description = "Libretro port of ScummVM"; - license = lib.licenses.gpl2Only; - }; - }; - - smsplus-gx = mkLibretroCore { - core = "smsplus"; - repo = "smsplus-gx"; - meta = { - description = "SMS Plus GX libretro port"; - license = lib.licenses.gpl2Plus; - }; - }; - - snes9x = mkLibretroCore { - core = "snes9x"; - makefile = "Makefile"; - preBuild = "cd libretro"; - meta = { - description = "Port of SNES9x git to libretro"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - snes9x2002 = mkLibretroCore { - core = "snes9x2002"; - makefile = "Makefile"; - meta = { - description = "Optimized port/rewrite of SNES9x 1.39 to Libretro"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - snes9x2005 = mkLibretroCore { - core = "snes9x2005"; - makefile = "Makefile"; - meta = { - description = "Optimized port/rewrite of SNES9x 1.43 to Libretro"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - snes9x2005-plus = mkLibretroCore { - core = "snes9x2005-plus"; - repo = "snes9x2005"; - makefile = "Makefile"; - makeFlags = [ "USE_BLARGG_APU=1" ]; - meta = { - description = "Optimized port/rewrite of SNES9x 1.43 to Libretro, with Blargg's APU"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - snes9x2010 = mkLibretroCore { - core = "snes9x2010"; - meta = { - description = "Optimized port/rewrite of SNES9x 1.52+ to Libretro"; - # Non-commercial clause - license = lib.licenses.unfreeRedistributable; - }; - }; - - stella = mkLibretroCore { - core = "stella"; - makefile = "Makefile"; - preBuild = "cd src/os/libretro"; - dontConfigure = true; - meta = { - description = "Port of Stella to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - stella2014 = mkLibretroCore { - core = "stella2014"; - makefile = "Makefile"; - meta = { - description = "Port of Stella ~2014 to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - swanstation = mkLibretroCore { - core = "swanstation"; - extraNativeBuildInputs = [ cmake ]; - makefile = "Makefile"; - cmakeFlags = [ - "-DBUILD_LIBRETRO_CORE=ON" - ]; - meta = { - description = "Port of SwanStation (a fork of DuckStation) to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - tgbdual = mkLibretroCore { - core = "tgbdual"; - makefile = "Makefile"; - meta = { - description = "Port of TGBDual to libretro"; - license = lib.licenses.gpl2Only; - }; - }; - - thepowdertoy = mkLibretroCore { - core = "thepowdertoy"; - extraNativeBuildInputs = [ cmake ]; - makefile = "Makefile"; - postBuild = "cd src"; - meta = { - description = "Port of The Powder Toy to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - tic80 = mkLibretroCore { - core = "tic80"; - extraNativeBuildInputs = [ cmake pkg-config ]; - makefile = "Makefile"; - cmakeFlags = [ - "-DBUILD_LIBRETRO=ON" - "-DBUILD_DEMO_CARTS=OFF" - "-DBUILD_PRO=OFF" - "-DBUILD_PLAYER=OFF" - "-DBUILD_SDL=OFF" - "-DBUILD_SOKOL=OFF" - ]; - preConfigure = "cd core"; - postBuild = "cd lib"; - meta = { - description = "Port of TIC-80 to libretro"; - license = lib.licenses.mit; - }; - }; - - twenty-fortyeight = mkLibretroCore { - core = "2048"; - meta = { - description = "Port of 2048 puzzle game to the libretro API"; - license = lib.licenses.unlicense; - }; - }; - - vba-m = mkLibretroCore { - core = "vbam"; - repo = "vba-m"; - makefile = "Makefile"; - preBuild = "cd src/libretro"; - meta = { - description = "vanilla VBA-M libretro port"; - license = lib.licenses.gpl2Only; - }; - }; - - vba-next = mkLibretroCore { - core = "vba-next"; - meta = { - description = "VBA-M libretro port with modifications for speed"; - license = lib.licenses.gpl2Only; - }; - }; - - vecx = mkLibretroCore { - core = "vecx"; - extraBuildInputs = [ libGL libGLU ]; - meta = { - description = "Port of Vecx to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - virtualjaguar = mkLibretroCore { - core = "virtualjaguar"; - makefile = "Makefile"; - meta = { - description = "Port of VirtualJaguar to libretro"; - license = lib.licenses.gpl3Only; - }; - }; - - yabause = mkLibretroCore { - core = "yabause"; - makefile = "Makefile"; - # Disable SSE for non-x86. DYNAREC doesn't build on aarch64. - makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "HAVE_SSE=0"; - preBuild = "cd yabause/src/libretro"; - meta = { - description = "Port of Yabause to libretro"; - license = lib.licenses.gpl2Only; - }; - }; -} +lib.makeScope newScope (self: { + mkLibretroCore = self.callPackage ./mkLibretroCore.nix; + + atari800 = self.callPackage ./cores/atari800.nix { }; + + beetle-gba = self.callPackage ./cores/beetle-gba.nix { }; + + beetle-lynx = self.callPackage ./cores/beetle-lynx.nix { }; + + beetle-ngp = self.callPackage ./cores/beetle-ngp.nix { }; + + beetle-pce = self.callPackage ./cores/beetle-pce.nix { }; + + beetle-pce-fast = self.callPackage ./cores/beetle-pce-fast.nix { }; + + beetle-pcfx = self.callPackage ./cores/beetle-pcfx.nix { }; + + beetle-psx = self.callPackage ./cores/beetle-psx.nix { }; + + beetle-psx-hw = self.beetle-psx.override { withHw = true; }; + + beetle-saturn = self.callPackage ./cores/beetle-saturn.nix { }; + + beetle-supafaust = self.callPackage ./cores/beetle-supafaust.nix { }; + + beetle-supergrafx = self.callPackage ./cores/beetle-supergrafx.nix { }; + + beetle-vb = self.callPackage ./cores/beetle-vb.nix { }; + + beetle-wswan = self.callPackage ./cores/beetle-wswan.nix { }; + + blastem = self.callPackage ./cores/blastem.nix { }; + + bluemsx = self.callPackage ./cores/bluemsx.nix { }; + + bsnes = self.callPackage ./cores/bsnes.nix { }; + + bsnes-hd = self.callPackage ./cores/bsnes-hd.nix { }; + + bsnes-mercury = self.callPackage ./cores/bsnes-mercury.nix { }; + + bsnes-mercury-balanced = self.bsnes-mercury.override { withProfile = "balanced"; }; + + bsnes-mercury-performance = self.bsnes-mercury.override { withProfile = "performance"; }; + + citra = self.callPackage ./cores/citra.nix { }; + + desmume = self.callPackage ./cores/desmume.nix { }; + + desmume2015 = self.callPackage ./cores/desmume2015.nix { }; + + dolphin = self.callPackage ./cores/dolphin.nix { }; + + dosbox = self.callPackage ./cores/dosbox.nix { }; + + dosbox-pure = self.callPackage ./cores/dosbox-pure.nix { }; + + easyrpg = self.callPackage ./cores/easyrpg.nix { }; + + eightyone = self.callPackage ./cores/eightyone.nix { }; + + fbalpha2012 = self.callPackage ./cores/fbalpha2012.nix { }; + + fbneo = self.callPackage ./cores/fbneo.nix { }; + + fceumm = self.callPackage ./cores/fceumm.nix { }; + + flycast = self.callPackage ./cores/flycast.nix { }; + + fmsx = self.callPackage ./cores/fmsx.nix { }; + + freeintv = self.callPackage ./cores/freeintv.nix { }; + + fuse = self.callPackage ./cores/fuse.nix { }; + + gambatte = self.callPackage ./cores/gambatte.nix { }; + + genesis-plus-gx = self.callPackage ./cores/genesis-plus-gx.nix { }; + + gpsp = self.callPackage ./cores/gpsp.nix { }; + + gw = self.callPackage ./cores/gw.nix { }; + + handy = self.callPackage ./cores/handy.nix { }; + + hatari = self.callPackage ./cores/hatari.nix { }; + + mame = self.callPackage ./cores/mame.nix { }; + + mame2000 = self.callPackage ./cores/mame2000.nix { }; + + mame2003 = self.callPackage ./cores/mame2003.nix { }; + + mame2003-plus = self.callPackage ./cores/mame2003-plus.nix { }; + + mame2010 = self.callPackage ./cores/mame2010.nix { }; + + mame2015 = self.callPackage ./cores/mame2015.nix { }; + + mame2016 = self.callPackage ./cores/mame2016.nix { }; + + melonds = self.callPackage ./cores/melonds.nix { }; + + mesen = self.callPackage ./cores/mesen.nix { }; + + mesen-s = self.callPackage ./cores/mesen-s.nix { }; + + meteor = self.callPackage ./cores/meteor.nix { }; + + mgba = self.callPackage ./cores/mgba.nix { }; + + mrboom = self.callPackage ./cores/mrboom.nix { }; + + mupen64plus = self.callPackage ./cores/mupen64plus.nix { }; + + neocd = self.callPackage ./cores/neocd.nix { }; + + nestopia = self.callPackage ./cores/nestopia.nix { }; + + np2kai = self.callPackage ./cores/np2kai.nix { }; + + nxengine = self.callPackage ./cores/nxengine.nix { }; + + o2em = self.callPackage ./cores/o2em.nix { }; + + opera = self.callPackage ./cores/opera.nix { }; + + parallel-n64 = self.callPackage ./cores/parallel-n64.nix { }; + + pcsx2 = self.callPackage ./cores/pcsx2.nix { }; + + pcsx-rearmed = self.callPackage ./cores/pcsx-rearmed.nix { }; + pcsx_rearmed = lib.lowPrio (self.pcsx-rearmed); # added 2024-11-20 + + picodrive = self.callPackage ./cores/picodrive.nix { }; + + play = self.callPackage ./cores/play.nix { }; + + ppsspp = self.callPackage ./cores/ppsspp.nix { }; + + prboom = self.callPackage ./cores/prboom.nix { }; + + prosystem = self.callPackage ./cores/prosystem.nix { }; + + puae = self.callPackage ./cores/puae.nix { }; + + quicknes = self.callPackage ./cores/quicknes.nix { }; + + same_cdi = self.callPackage ./cores/same_cdi.nix { }; # the name is not a typo + + sameboy = self.callPackage ./cores/sameboy.nix { }; + + scummvm = self.callPackage ./cores/scummvm.nix { }; + + smsplus-gx = self.callPackage ./cores/smsplus-gx.nix { }; + + snes9x = self.callPackage ./cores/snes9x.nix { }; + + snes9x2002 = self.callPackage ./cores/snes9x2002.nix { }; + + snes9x2005 = self.callPackage ./cores/snes9x2005.nix { }; + + snes9x2005-plus = self.snes9x2005.override { withBlarggAPU = true; }; + + snes9x2010 = self.callPackage ./cores/snes9x2010.nix { }; + + stella = self.callPackage ./cores/stella.nix { }; + + stella2014 = self.callPackage ./cores/stella2014.nix { }; + + swanstation = self.callPackage ./cores/swanstation.nix { }; + + tgbdual = self.callPackage ./cores/tgbdual.nix { }; + + thepowdertoy = self.callPackage ./cores/thepowdertoy.nix { }; + + tic80 = self.callPackage ./cores/tic80.nix { }; + + twenty-fortyeight = self.callPackage ./cores/twenty-fortyeight.nix { }; + + vba-m = self.callPackage ./cores/vba-m.nix { }; + + vba-next = self.callPackage ./cores/vba-next.nix { }; + + vecx = self.callPackage ./cores/vecx.nix { }; + + virtualjaguar = self.callPackage ./cores/virtualjaguar.nix { }; + + yabause = self.callPackage ./cores/yabause.nix { }; +}) diff --git a/pkgs/applications/emulators/retroarch/cores/atari800.nix b/pkgs/applications/emulators/retroarch/cores/atari800.nix new file mode 100644 index 000000000000..d749224cb248 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/atari800.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-gba.nix b/pkgs/applications/emulators/retroarch/cores/beetle-gba.nix new file mode 100644 index 000000000000..ba6f74a5a6a0 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-gba.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-lynx.nix b/pkgs/applications/emulators/retroarch/cores/beetle-lynx.nix new file mode 100644 index 000000000000..dcc3a00d1d2a --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-lynx.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mednafen-lynx"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "beetle-lynx-libretro"; + rev = "7fead71b49e0f08be5c4d4224fea73c6174763bf"; + hash = "sha256-fYBx/bjbhRXoVIGnEg4/oMVm705ivL1os+FfVQLRSyI="; + }; + + makefile = "Makefile"; + + meta = { + description = "Port of Mednafen's Lynx core to libretro"; + homepage = "https://github.com/libretro/beetle-lynx-libretro"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-ngp.nix b/pkgs/applications/emulators/retroarch/cores/beetle-ngp.nix new file mode 100644 index 000000000000..567d7332466b --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-ngp.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-pce-fast.nix b/pkgs/applications/emulators/retroarch/cores/beetle-pce-fast.nix new file mode 100644 index 000000000000..f3c9551a9cc0 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-pce-fast.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mednafen-pce-fast"; + version = "0-unstable-2024-11-15"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "beetle-pce-fast-libretro"; + rev = "931586f0512663f625a6e981d3047a6620281ab5"; + hash = "sha256-9Nne4upiQNSAlTZsyXcLNIwN8MMKUO1ycahowYW1sWg="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-pce.nix b/pkgs/applications/emulators/retroarch/cores/beetle-pce.nix new file mode 100644 index 000000000000..346ebc6cb3b6 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-pce.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mednafen-pce"; + version = "0-unstable-2024-11-15"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "beetle-pce-libretro"; + rev = "af28fb0385d00e0292c4703b3aa7e72762b564d2"; + hash = "sha256-W+74RTIidSUdviihLy926OvlSdqMECvOLEEiWMtB50w="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-pcfx.nix b/pkgs/applications/emulators/retroarch/cores/beetle-pcfx.nix new file mode 100644 index 000000000000..047a25cd2afa --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-pcfx.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-psx.nix b/pkgs/applications/emulators/retroarch/cores/beetle-psx.nix new file mode 100644 index 000000000000..aebe33c49013 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-psx.nix @@ -0,0 +1,38 @@ +{ + lib, + libGL, + libGLU, + fetchFromGitHub, + mkLibretroCore, + withHw ? false, +}: +mkLibretroCore { + core = "mednafen-psx" + lib.optionalString withHw "-hw"; + version = "0-unstable-2024-11-15"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "beetle-psx-libretro"; + rev = "1068cb8dbd6f312664ecf5901625cab4a6533204"; + hash = "sha256-ioAnpz6OkHWPaYE0uTEvnHV+vGzq02bQ4oUP8jW6/YA="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-saturn.nix b/pkgs/applications/emulators/retroarch/cores/beetle-saturn.nix new file mode 100644 index 000000000000..e648472b14ff --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-saturn.nix @@ -0,0 +1,28 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mednafen-saturn"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "beetle-saturn-libretro"; + rev = "0a78a9a5ab0088ba19f21e028dda9f4b4d7c9e48"; + hash = "sha256-WNQhtaYBg7JqPdxcD0cLRjr2pSda6Xmx/WWYzyu5u9c="; + }; + + 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" + ]; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-supafaust.nix b/pkgs/applications/emulators/retroarch/cores/beetle-supafaust.nix new file mode 100644 index 000000000000..3f8d18fec719 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-supafaust.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mednafen-supafaust"; + version = "0-unstable-2024-10-01"; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-supergrafx.nix b/pkgs/applications/emulators/retroarch/cores/beetle-supergrafx.nix new file mode 100644 index 000000000000..3f0597c4f6ca --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-supergrafx.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-vb.nix b/pkgs/applications/emulators/retroarch/cores/beetle-vb.nix new file mode 100644 index 000000000000..e6af3a42ae21 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-vb.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/beetle-wswan.nix b/pkgs/applications/emulators/retroarch/cores/beetle-wswan.nix new file mode 100644 index 000000000000..39b2afda52e9 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/beetle-wswan.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mednafen-wswan"; + version = "0-unstable-2024-06-28"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "beetle-wswan-libretro"; + rev = "440e9228592a3f603d7d09e8bee707b0163f545f"; + hash = "sha256-+98gCDBYeqUlFGzX83lwTGqSezLnzWRwapZCn4T37uE="; + }; + + makefile = "Makefile"; + + meta = { + description = "Port of Mednafen's WonderSwan core to libretro"; + homepage = "https://github.com/libretro/beetle-wswan-libretro"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/blastem.nix b/pkgs/applications/emulators/retroarch/cores/blastem.nix new file mode 100644 index 000000000000..cdcba56c6a98 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/blastem.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/bluemsx.nix b/pkgs/applications/emulators/retroarch/cores/bluemsx.nix new file mode 100644 index 000000000000..1f352cf6356b --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/bluemsx.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "bluemsx"; + version = "0-unstable-2024-10-22"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "bluemsx-libretro"; + rev = "01ce142ccb85c302420cb962d1b6e6a68a6ce076"; + hash = "sha256-h3Zpv+h6CbM1pdSOXsjN0pFUjXLn5T/R5W55VZXpMVM="; + }; + + meta = { + description = "Port of BlueMSX to libretro"; + homepage = "https://github.com/libretro/blueMSX-libretro"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/bsnes-hd.nix b/pkgs/applications/emulators/retroarch/cores/bsnes-hd.nix new file mode 100644 index 000000000000..5353a8ef49b5 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/bsnes-hd.nix @@ -0,0 +1,38 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, + xorg, +}: +mkLibretroCore { + core = "bsnes-hd-beta"; + version = "0-unstable-2023-04-26"; + + src = fetchFromGitHub { + owner = "DerKoun"; + repo = "bsnes-hd"; + rev = "f46b6d6368ea93943a30b5d4e79e8ed51c2da5e8"; + hash = "sha256-Y3FhGtcz7BzwUSBy1SGMuylJdZti/JB8qQnabIkG/dI="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/bsnes-mercury.nix b/pkgs/applications/emulators/retroarch/cores/bsnes-mercury.nix new file mode 100644 index 000000000000..edb377829e11 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/bsnes-mercury.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/bsnes.nix b/pkgs/applications/emulators/retroarch/cores/bsnes.nix new file mode 100644 index 000000000000..0e31a09943da --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/bsnes.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "bsnes"; + version = "0-unstable-2024-09-06"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "bsnes-libretro"; + rev = "20c55eb6333a11395ba637df8583066483e58cb2"; + hash = "sha256-IP00xtxS3wwnQSmYltrX8GEHZX/65xnx2EsmQlE1VZM="; + }; + + makefile = "Makefile"; + + meta = { + description = "Port of bsnes to libretro"; + homepage = "https://github.com/libretro/bsnes-libretro"; + license = lib.licenses.gpl3Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/citra.nix b/pkgs/applications/emulators/retroarch/cores/citra.nix new file mode 100644 index 000000000000..1739d978d4d0 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/citra.nix @@ -0,0 +1,52 @@ +{ + lib, + fetchFromGitHub, + boost, + ffmpeg_6, + gcc12Stdenv, + libGL, + libGLU, + mkLibretroCore, + nasm, +}: +mkLibretroCore rec { + core = "citra"; + version = "0-unstable-2024-04-01"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "citra"; + # TODO: upstream migrated to cmake, this is the latest rev without it + rev = "36b600692905ebd457cbc9321e2f521938eced16"; + hash = "sha256-ZJcsdFgLBda4xS4Z6I8Pu+6B9TYwak//0CbloDK3Yg0="; + fetchSubmodules = true; + }; + + makefile = "Makefile"; + makeFlags = [ + "HAVE_FFMPEG_STATIC=0" + # https://github.com/libretro/citra/blob/1a66174355b5ed948de48ef13c0ed508b6d6169f/Makefile#L87-L90 + "GIT_REV=${src.rev}" + "GIT_DESC=${lib.substring 0 7 src.rev}" + "GIT_BRANCH=master" + "BUILD_DATE=01/01/1970_00:00" + ]; + + extraBuildInputs = [ + boost + ffmpeg_6 + libGL + libGLU + nasm + ]; + + # FIXME: build fail with GCC13: + # error: 'mic_device_name' has incomplete type + stdenv = gcc12Stdenv; + + meta = { + description = "Port of Citra to libretro"; + homepage = "https://github.com/libretro/citra"; + license = lib.licenses.gpl2Plus; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/desmume.nix b/pkgs/applications/emulators/retroarch/cores/desmume.nix new file mode 100644 index 000000000000..bd03cb5bf341 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/desmume.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/desmume2015.nix b/pkgs/applications/emulators/retroarch/cores/desmume2015.nix new file mode 100644 index 000000000000..6b654234aee6 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/desmume2015.nix @@ -0,0 +1,40 @@ +{ + lib, + stdenv, + fetchFromGitHub, + mkLibretroCore, + libpcap, + libGLU, + libGL, + xorg, +}: +mkLibretroCore { + core = "desmume2015"; + version = "0-unstable-2024-10-21"; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/dolphin.nix b/pkgs/applications/emulators/retroarch/cores/dolphin.nix new file mode 100644 index 000000000000..b645617b4696 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/dolphin.nix @@ -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-2024-04-19"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "dolphin"; + rev = "89a4df725d4eb24537728f7d655cddb1add25c18"; + hash = "sha256-f9O3//EuoCSPQC7GWmf0EzAEpjoKof30kIDBCDw0dbs="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/dosbox-pure.nix b/pkgs/applications/emulators/retroarch/cores/dosbox-pure.nix new file mode 100644 index 000000000000..da24544b5f17 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/dosbox-pure.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "dosbox-pure"; + version = "0-unstable-2024-09-28"; + + src = fetchFromGitHub { + owner = "schellingb"; + repo = "dosbox-pure"; + rev = "9b4147fd14332a7354c9b76fa72653bda2d919e9"; + hash = "sha256-lzRBzBMIQ3X+VAHK8pl/HYELecTkdFlWJI7C1csmZ7I="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/dosbox.nix b/pkgs/applications/emulators/retroarch/cores/dosbox.nix new file mode 100644 index 000000000000..3dfc236eb0c5 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/dosbox.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/easyrpg.nix b/pkgs/applications/emulators/retroarch/cores/easyrpg.nix new file mode 100644 index 000000000000..d28a571ba576 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/easyrpg.nix @@ -0,0 +1,75 @@ +{ + lib, + fetchFromGitHub, + cmake, + fetchpatch, + fmt, + freetype, + harfbuzz, + liblcf, + libpng, + libsndfile, + libvorbis, + libxmp, + mkLibretroCore, + mpg123, + opusfile, + pcre, + pixman, + pkg-config, + speexdsp, +}: +mkLibretroCore { + core = "easyrpg"; + version = "0.8-unstable-2023-04-29"; + + src = fetchFromGitHub { + owner = "EasyRPG"; + repo = "Player"; + rev = "f8e41f43b619413f95847536412b56f85307d378"; + hash = "sha256-nvWM4czTv/GxY9raomBEn7dmKBeLtSA9nvjMJxc3Q8s="; + fetchSubmodules = true; + }; + + extraNativeBuildInputs = [ + cmake + pkg-config + ]; + extraBuildInputs = [ + fmt + freetype + harfbuzz + liblcf + libpng + libsndfile + libvorbis + libxmp + mpg123 + opusfile + pcre + pixman + speexdsp + ]; + patches = [ + # The following patch is shared with easyrpg-player. + # Update when new versions of liblcf and easyrpg-player are released. + # See easyrpg-player expression for details. + (fetchpatch { + name = "0001-Fix-building-with-fmtlib-10.patch"; + url = "https://github.com/EasyRPG/Player/commit/ab6286f6d01bada649ea52d1f0881dde7db7e0cf.patch"; + hash = "sha256-GdSdVFEG1OJCdf2ZIzTP+hSrz+ddhTMBvOPjvYQHy54="; + }) + ]; + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DPLAYER_TARGET_PLATFORM=libretro" + "-DCMAKE_INSTALL_DATADIR=${placeholder "out"}/share" + ]; + makefile = "Makefile"; + + meta = { + description = "EasyRPG Player libretro port"; + homepage = "https://github.com/EasyRPG/Player"; + license = lib.licenses.gpl3Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/eightyone.nix b/pkgs/applications/emulators/retroarch/cores/eightyone.nix new file mode 100644 index 000000000000..88f0fa5822df --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/eightyone.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/fbalpha2012.nix b/pkgs/applications/emulators/retroarch/cores/fbalpha2012.nix new file mode 100644 index 000000000000..febf6f7935a8 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/fbalpha2012.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "fbalpha2012"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "fbalpha2012"; + rev = "77167cea72e808384c136c8c163a6b4975ce7a84"; + hash = "sha256-giEV09dT/e82bmDlRkxpkW04JcsEZc/enIPecqYtg3c="; + }; + + makefile = "makefile.libretro"; + preBuild = "cd svn-current/trunk"; + + meta = { + description = "Port of Final Burn Alpha ~2012 to libretro"; + homepage = "https://github.com/libretro/fbalpha2012"; + license = lib.licenses.unfreeRedistributable; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/fbneo.nix b/pkgs/applications/emulators/retroarch/cores/fbneo.nix new file mode 100644 index 000000000000..238d96778a98 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/fbneo.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "fbneo"; + version = "0-unstable-2024-10-03"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "fbneo"; + rev = "d72f49f4a45dbfc5a855956d1a75ce2d0601c1c5"; + hash = "sha256-+T+HQo6IfY8+oE/mOg54Vn9NhasGYNCLXksFdSDT/xE="; + }; + + makefile = "Makefile"; + preBuild = "cd src/burner/libretro"; + + meta = { + description = "Port of FBNeo to libretro"; + homepage = "https://github.com/libretro/fbneo"; + license = lib.licenses.unfreeRedistributable; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/fceumm.nix b/pkgs/applications/emulators/retroarch/cores/fceumm.nix new file mode 100644 index 000000000000..93c6956d18b1 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/fceumm.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "fceumm"; + version = "0-unstable-2024-09-23"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "libretro-fceumm"; + rev = "e226068f979cd8fbfc3be9780d16cfb1405095b0"; + hash = "sha256-2G5EzcDJkEhaN+nXi/wu3+Ejim04ZzOr+LW69cLAEuM="; + }; + + meta = { + description = "FCEUmm libretro port"; + homepage = "https://github.com/libretro/libretro-fceumm"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/flycast.nix b/pkgs/applications/emulators/retroarch/cores/flycast.nix new file mode 100644 index 000000000000..77abcb4eaded --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/flycast.nix @@ -0,0 +1,38 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, + cmake, + libGL, + libGLU, +}: +mkLibretroCore { + core = "flycast"; + version = "0-unstable-2024-10-05"; + + src = fetchFromGitHub { + owner = "flyinghead"; + repo = "flycast"; + rev = "d689c50e21bf956913ac607933cd4082eaedc06b"; + hash = "sha256-XIe1JrKVY4ba5WnKrVofWNpJU5pcwUyDd14ZzaGcf+k="; + 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" + ]; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/fmsx.nix b/pkgs/applications/emulators/retroarch/cores/fmsx.nix new file mode 100644 index 000000000000..ca320c9df653 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/fmsx.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "fmsx"; + version = "0-unstable-2024-06-28"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "fmsx-libretro"; + rev = "cf97a3c6da07d5f8e98c90c907ad987ffea432e0"; + hash = "sha256-mPgmt05XDnB+eIWtOpBfZ37Cz24VBei1lLLaYsJNeAA="; + }; + + makefile = "Makefile"; + + meta = { + description = "FMSX libretro port"; + homepage = "https://github.com/libretro/fmsx-libretro"; + license = lib.licenses.unfreeRedistributable; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/freeintv.nix b/pkgs/applications/emulators/retroarch/cores/freeintv.nix new file mode 100644 index 000000000000..e5486b6a1d03 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/freeintv.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "freeintv"; + version = "0-unstable-2024-06-28"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "freeintv"; + rev = "6bd91d0d83d896e66b9fd7e5e239f93f00e4ad87"; + hash = "sha256-P3devj/aAa0e/QpV68kQkLAvhrVGO8O8ijkUAobgUb0="; + }; + + makefile = "Makefile"; + + meta = { + description = "FreeIntv libretro port"; + homepage = "https://github.com/libretro/freeintv"; + license = lib.licenses.gpl3Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/fuse.nix b/pkgs/applications/emulators/retroarch/cores/fuse.nix new file mode 100644 index 000000000000..a4e954ac109f --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/fuse.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "fuse"; + version = "0-unstable-2024-09-20"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "fuse-libretro"; + rev = "6fd07d90acc38a1b8835bf16539b833f21aaa38f"; + hash = "sha256-q5vcFNr1RBeTaw1R2LDY9xLU1oGeWtPemTdliWR+39s="; + }; + + meta = { + description = "Port of the Fuse Unix Spectrum Emulator to libretro"; + homepage = "https://github.com/libretro/fuse-libretro"; + license = lib.licenses.gpl3Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/gambatte.nix b/pkgs/applications/emulators/retroarch/cores/gambatte.nix new file mode 100644 index 000000000000..90840af74960 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/gambatte.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "gambatte"; + version = "0-unstable-2024-10-04"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "gambatte-libretro"; + rev = "3eeb65e9bcf4b2a7ca24c5cebdfa7e342177ef0f"; + hash = "sha256-tNGMR6GIyXen9+Ktg3IvYTcPidc+5Z8TpBQu1YgmqlY="; + }; + + meta = { + description = "Gambatte libretro port"; + homepage = "https://github.com/libretro/gambatte-libretro"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/genesis-plus-gx.nix b/pkgs/applications/emulators/retroarch/cores/genesis-plus-gx.nix new file mode 100644 index 000000000000..caf2d667ba95 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/genesis-plus-gx.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "genesis-plus-gx"; + version = "0-unstable-2024-09-18"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "Genesis-Plus-GX"; + rev = "7de0f0b6cde9bda1235b448aa607044b3f80ab3c"; + hash = "sha256-W06vSrGKbXMcXIouW9/fD93sBfwREqIL8HvB3kan0tM="; + }; + + meta = { + description = "Enhanced Genesis Plus libretro port"; + homepage = "https://github.com/libretro/Genesis-Plus-GX"; + license = lib.licenses.unfreeRedistributable; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/gpsp.nix b/pkgs/applications/emulators/retroarch/cores/gpsp.nix new file mode 100644 index 000000000000..cd4c55e916c6 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/gpsp.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "gpsp"; + version = "0-unstable-2024-09-18"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "gpsp"; + rev = "36061caf8cc5e15c3c92fb772b6b8560c7c59ec7"; + hash = "sha256-o36OUdgm7p+rAMN6R2e2Lqi4oBLTyxziw7Lr20ERBg0="; + }; + + makefile = "Makefile"; + + meta = { + description = "Port of gpSP to libretro"; + homepage = "https://github.com/libretro/gpsp"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/gw.nix b/pkgs/applications/emulators/retroarch/cores/gw.nix new file mode 100644 index 000000000000..274bb2dfced4 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/gw.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/handy.nix b/pkgs/applications/emulators/retroarch/cores/handy.nix new file mode 100644 index 000000000000..fe046d5eaf38 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/handy.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "handy"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "libretro-handy"; + rev = "4e9e072796e5552a9d57f6ab83b3f85f27b17fb6"; + hash = "sha256-ThzFEqLCX2JC06n6GZgkGzX5sFY5CxFDjkeekXRmbXY="; + }; + + makefile = "Makefile"; + + meta = { + description = "Port of Handy to libretro"; + homepage = "https://github.com/libretro/libretro-handy"; + license = lib.licenses.zlib; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/hatari.nix b/pkgs/applications/emulators/retroarch/cores/hatari.nix new file mode 100644 index 000000000000..0daef12b19dd --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/hatari.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mame.nix b/pkgs/applications/emulators/retroarch/cores/mame.nix new file mode 100644 index 000000000000..85b034aa599a --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mame.nix @@ -0,0 +1,39 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, + python3, + alsa-lib, + libGLU, + libGL, +}: +mkLibretroCore { + core = "mame"; + version = "0-unstable-2024-11-01"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "mame"; + rev = "a67797ad2f7516906ed7acef87569c6f35ca8739"; + hash = "sha256-MF6MWQftHBYL1Uv3ZYKFqCH24nd1+M73rhUzkdftMzk="; + 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 + ]; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mame2000.nix b/pkgs/applications/emulators/retroarch/cores/mame2000.nix new file mode 100644 index 000000000000..fd3448e8cb37 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mame2000.nix @@ -0,0 +1,27 @@ +{ + lib, + stdenv, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mame2000"; + version = "0-unstable-2024-11-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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mame2003-plus.nix b/pkgs/applications/emulators/retroarch/cores/mame2003-plus.nix new file mode 100644 index 000000000000..d895438cef5e --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mame2003-plus.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mame2003-plus"; + version = "0-unstable-2024-11-01"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "mame2003-plus-libretro"; + rev = "b00ea1c9574126d75ae7b80c3b41e1186421fc1d"; + hash = "sha256-Zq4P5UsZh3p9/zasfTC+pzWiLAo7T2qAgZw4bJ4ADdM="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mame2003.nix b/pkgs/applications/emulators/retroarch/cores/mame2003.nix new file mode 100644 index 000000000000..47b83ea80c5c --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mame2003.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mame2003"; + version = "0-unstable-2024-11-01"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "mame2003-libretro"; + rev = "6d543115531fc96422b73c989a628600cacbea50"; + hash = "sha256-jFzFQVB0uiSRa82sq1fiMEXyzzDJqRANNgq5hj/ZAl4="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mame2010.nix b/pkgs/applications/emulators/retroarch/cores/mame2010.nix new file mode 100644 index 000000000000..52fa54a76408 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mame2010.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mame2015.nix b/pkgs/applications/emulators/retroarch/cores/mame2015.nix new file mode 100644 index 000000000000..8096a99a089d --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mame2015.nix @@ -0,0 +1,32 @@ +{ + lib, + alsa-lib, + fetchFromGitHub, + mkLibretroCore, + python3, +}: +mkLibretroCore { + core = "mame2015"; + version = "0-unstable-2023-11-01"; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mame2016.nix b/pkgs/applications/emulators/retroarch/cores/mame2016.nix new file mode 100644 index 000000000000..31e929b7089a --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mame2016.nix @@ -0,0 +1,36 @@ +{ + lib, + alsa-lib, + fetchFromGitHub, + mkLibretroCore, + python3, +}: +mkLibretroCore { + core = "mame2016"; + version = "0-unstable-2024-04-06"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "mame2016-libretro"; + rev = "01058613a0109424c4e7211e49ed83ac950d3993"; + hash = "sha256-IsM7f/zlzvomVOYlinJVqZllUhDfy4NNTeTPtNmdVak="; + }; + + patches = [ ./patches/mame2016-python311.patch ]; + extraNativeBuildInputs = [ python3 ]; + extraBuildInputs = [ alsa-lib ]; + makeFlags = [ "PYTHON_EXECUTABLE=python3" ]; + # Build failures when this is set to a bigger number + NIX_BUILD_CORES = 8; + # Fix build errors in GCC13 + 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 + ]; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/melonds.nix b/pkgs/applications/emulators/retroarch/cores/melonds.nix new file mode 100644 index 000000000000..59e0676a5594 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/melonds.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mesen-s.nix b/pkgs/applications/emulators/retroarch/cores/mesen-s.nix new file mode 100644 index 000000000000..ea349e193621 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mesen-s.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mesen.nix b/pkgs/applications/emulators/retroarch/cores/mesen.nix new file mode 100644 index 000000000000..3c6c9bb9399e --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mesen.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mesen"; + version = "0-unstable-2024-06-09"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "mesen"; + rev = "91db6be681f70b2080525c267af6132555323ea1"; + hash = "sha256-rw/bwHaeglO/DPeOCFHAWF5Y5DXVKiteO4bWZjTB4rI="; + }; + + makefile = "Makefile"; + preBuild = "cd Libretro"; + + meta = { + description = "Port of Mesen to libretro"; + homepage = "https://github.com/libretro/mesen"; + license = lib.licenses.gpl3Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/meteor.nix b/pkgs/applications/emulators/retroarch/cores/meteor.nix new file mode 100644 index 000000000000..f1e5b1c55121 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/meteor.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mgba.nix b/pkgs/applications/emulators/retroarch/cores/mgba.nix new file mode 100644 index 000000000000..02bd1e8b837c --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mgba.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "mgba"; + version = "0-unstable-2024-11-12"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "mgba"; + rev = "747362c02d2e71ee7c363e8dcb240925be8af906"; + hash = "sha256-dBhdS6C1H02iwdYDVvJmkPWob81vpmQJdHUHJFAq2vo="; + }; + + meta = { + description = "Port of mGBA to libretro"; + homepage = "https://github.com/libretro/mgba"; + license = lib.licenses.mpl20; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mrboom.nix b/pkgs/applications/emulators/retroarch/cores/mrboom.nix new file mode 100644 index 000000000000..dcb6aaecf9ec --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mrboom.nix @@ -0,0 +1,26 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore rec { + core = "mrboom"; + version = "0-unstable-2024-07-01"; + + src = fetchFromGitHub { + owner = "Javanaise"; + repo = "mrboom-libretro"; + rev = "22765ce7176d236d846f504318a51c448d2b469b"; + hash = "sha256-hzdc4PM/EARNEtpeATo4VohXtkeBra6rCz3tdIgBfVw="; + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/mupen64plus.nix b/pkgs/applications/emulators/retroarch/cores/mupen64plus.nix new file mode 100644 index 000000000000..bf455e034deb --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/mupen64plus.nix @@ -0,0 +1,44 @@ +{ + lib, + stdenv, + fetchFromGitHub, + libGL, + libGLU, + libpng, + mkLibretroCore, + nasm, + xorg, +}: +mkLibretroCore { + core = "mupen64plus-next"; + version = "0-unstable-2024-10-29"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "mupen64plus-libretro-nx"; + rev = "4249e39b2c200e5f0895385f76d99928785f2bea"; + hash = "sha256-nII/PMYo2xLznmAcKs6jDWGRS1DC3tiDeT6KJKRnaCI="; + }; + + extraBuildInputs = [ + libGLU + libGL + libpng + nasm + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/neocd.nix b/pkgs/applications/emulators/retroarch/cores/neocd.nix new file mode 100644 index 000000000000..55fce9c5e269 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/neocd.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/nestopia.nix b/pkgs/applications/emulators/retroarch/cores/nestopia.nix new file mode 100644 index 000000000000..0275db2c133e --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/nestopia.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "nestopia"; + version = "0-unstable-2024-10-17"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "nestopia"; + rev = "b932740e8abbe2cda80d06b083fdd8115af1c5d5"; + hash = "sha256-lIWk3V93vTKZM/jvfLkA06c7DDSEQtLmqRzJUi0TK/4="; + }; + + makefile = "Makefile"; + preBuild = "cd libretro"; + + meta = { + description = "Nestopia libretro port"; + homepage = "https://github.com/libretro/nestopia"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/np2kai.nix b/pkgs/applications/emulators/retroarch/cores/np2kai.nix new file mode 100644 index 000000000000..2ca6b2fba9c6 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/np2kai.nix @@ -0,0 +1,31 @@ +{ + 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}" + ]; + + preBuild = "cd sdl"; + + meta = { + description = "Neko Project II kai libretro port"; + homepage = "https://github.com/AZO234/NP2kai"; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/nxengine.nix b/pkgs/applications/emulators/retroarch/cores/nxengine.nix new file mode 100644 index 000000000000..c9712892daab --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/nxengine.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/o2em.nix b/pkgs/applications/emulators/retroarch/cores/o2em.nix new file mode 100644 index 000000000000..e5deb54ea7dd --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/o2em.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "o2em"; + version = "0-unstable-2024-06-28"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "libretro-o2em"; + rev = "c8f458d035392963823fbb50db0cec0033d9315f"; + hash = "sha256-riqMXm+3BG4Gz0wrmVFxtVhuMRtZHZqCViAupp/Q42U="; + }; + + makefile = "Makefile"; + + meta = { + description = "Port of O2EM to libretro"; + homepage = "https://github.com/libretro/libretro-o2em"; + license = lib.licenses.artistic1; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/opera.nix b/pkgs/applications/emulators/retroarch/cores/opera.nix new file mode 100644 index 000000000000..5b3c12b73f52 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/opera.nix @@ -0,0 +1,26 @@ +{ + lib, + stdenv, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "opera"; + version = "0-unstable-2024-10-17"; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/parallel-n64.nix b/pkgs/applications/emulators/retroarch/cores/parallel-n64.nix new file mode 100644 index 000000000000..48ae3d922650 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/parallel-n64.nix @@ -0,0 +1,42 @@ +{ + lib, + stdenv, + fetchFromGitHub, + libGL, + libGLU, + libpng, + mkLibretroCore, +}: +mkLibretroCore { + core = "parallel-n64"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "parallel-n64"; + rev = "e372c5e327dcd649e9d840ffc3d88480b6866eda"; + hash = "sha256-q4octB5XDdl4PtLYVZfBgydVBNaOwzu9dPBY+Y68lVo="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/patches/mame2015-python311.patch b/pkgs/applications/emulators/retroarch/cores/patches/mame2015-python311.patch similarity index 100% rename from pkgs/applications/emulators/retroarch/patches/mame2015-python311.patch rename to pkgs/applications/emulators/retroarch/cores/patches/mame2015-python311.patch diff --git a/pkgs/applications/emulators/retroarch/patches/mame2016-python311.patch b/pkgs/applications/emulators/retroarch/cores/patches/mame2016-python311.patch similarity index 100% rename from pkgs/applications/emulators/retroarch/patches/mame2016-python311.patch rename to pkgs/applications/emulators/retroarch/cores/patches/mame2016-python311.patch diff --git a/pkgs/applications/emulators/retroarch/cores/pcsx-rearmed.nix b/pkgs/applications/emulators/retroarch/cores/pcsx-rearmed.nix new file mode 100644 index 000000000000..d96f80d1ceb0 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/pcsx-rearmed.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "pcsx-rearmed"; + version = "0-unstable-2024-11-17"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "pcsx_rearmed"; + rev = "e3d7ea45c75f2752e351d5c5b54cf7e79e66d26e"; + hash = "sha256-dJqomyUHYQ+vpyu7/w2S/NidgYbHiGBWjebFQAXjzI0="; + }; + + dontConfigure = true; + + meta = { + description = "Port of PCSX ReARMed to libretro"; + homepage = "https://github.com/libretro/pcsx_rearmed"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/pcsx2.nix b/pkgs/applications/emulators/retroarch/cores/pcsx2.nix new file mode 100644 index 000000000000..09a80f4dbe86 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/pcsx2.nix @@ -0,0 +1,64 @@ +{ + lib, + cmake, + fetchFromGitHub, + gcc12Stdenv, + gettext, + libGL, + libGLU, + libaio, + libpcap, + libpng, + libxml2, + mkLibretroCore, + pkg-config, + xxd, + xz, +}: +mkLibretroCore { + core = "pcsx2"; + version = "0-unstable-2023-01-30"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "lrps2"; + rev = "f3c8743d6a42fe429f703b476fecfdb5655a98a9"; + hash = "sha256-0piCNWX7QbZ58KyTlWp4h1qLxXpi1z6ML8sBHMTvCY4="; + }; + + extraNativeBuildInputs = [ + cmake + gettext + pkg-config + ]; + extraBuildInputs = [ + libaio + libGL + libGLU + libpcap + libpng + libxml2 + xz + xxd + ]; + makefile = "Makefile"; + cmakeFlags = [ "-DLIBRETRO=ON" ]; + # remove ccache + postPatch = '' + substituteInPlace CMakeLists.txt --replace-fail "ccache" "" + ''; + postBuild = "cd pcsx2"; + # causes redefinition of _FORTIFY_SOURCE + hardeningDisable = [ "fortify3" ]; + # FIXME: multiple build errors with GCC13. + # Unlikely to be fixed until we switch to libretro/pcsx2 that is a more + # up-to-date port (but still WIP). + stdenv = gcc12Stdenv; + + meta = { + description = "Port of PCSX2 to libretro"; + homepage = "https://github.com/libretro/lrps2"; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.x86; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/picodrive.nix b/pkgs/applications/emulators/retroarch/cores/picodrive.nix new file mode 100644 index 000000000000..7d3b3065e661 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/picodrive.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "picodrive"; + version = "0-unstable-2024-10-19"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "picodrive"; + rev = "0daf92b57fba1fdbc124651573e88373eef28aa5"; + hash = "sha256-rvgcGNpHhjHpg5q6qiu08lBn+Zjx87E5/Q98gPoffhE="; + fetchSubmodules = true; + }; + + dontConfigure = true; + + meta = { + description = "Fast MegaDrive/MegaCD/32X emulator"; + homepage = "https://github.com/libretro/picodrive"; + license = lib.licenses.unfreeRedistributable; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/play.nix b/pkgs/applications/emulators/retroarch/cores/play.nix new file mode 100644 index 000000000000..f87380b7e62d --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/play.nix @@ -0,0 +1,53 @@ +{ + lib, + boost, + bzip2, + cmake, + curl, + fetchFromGitHub, + icu, + libGL, + libGLU, + mkLibretroCore, + openssl, + xorg, +}: +mkLibretroCore { + core = "play"; + version = "0-unstable-2024-10-19"; + + src = fetchFromGitHub { + owner = "jpd002"; + repo = "Play-"; + rev = "c3cba5418b4e5618befd9c2790498cf3cf88372a"; + hash = "sha256-xO2Pgl1E0JFEsthTmG+Ka+NqOTWG/JeeAIa6wBWXJyc="; + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/ppsspp.nix b/pkgs/applications/emulators/retroarch/cores/ppsspp.nix new file mode 100644 index 000000000000..7339294e0767 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/ppsspp.nix @@ -0,0 +1,55 @@ +{ + lib, + cmake, + fetchFromGitHub, + libGL, + libGLU, + libzip, + mkLibretroCore, + pkg-config, + python3, + snappy, + xorg, +}: +mkLibretroCore { + core = "ppsspp"; + version = "0-unstable-2024-11-15"; + + src = fetchFromGitHub { + owner = "hrydgard"; + repo = "ppsspp"; + rev = "2402eea4b16908ad59079bcf3fab06ba63531a3c"; + hash = "sha256-bpeiZdcXkGWLFZOsxTGuVmo4xAiUb9v5Wf6pWkt5JV0="; + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/prboom.nix b/pkgs/applications/emulators/retroarch/cores/prboom.nix new file mode 100644 index 000000000000..64d4e28d286f --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/prboom.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "prboom"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "libretro-prboom"; + rev = "d25ccfb9739069824d8fff99e3ae78a58a09df01"; + hash = "sha256-IaMreS2MSkFdZ3Jff2FOZBvKIIa4KIkp41LIg3PLl44="; + }; + + makefile = "Makefile"; + + meta = { + description = "Prboom libretro port"; + homepage = "https://github.com/libretro/libretro-prboom"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/prosystem.nix b/pkgs/applications/emulators/retroarch/cores/prosystem.nix new file mode 100644 index 000000000000..4e202e6a2bb3 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/prosystem.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/puae.nix b/pkgs/applications/emulators/retroarch/cores/puae.nix new file mode 100644 index 000000000000..07cc1c006023 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/puae.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "puae"; + version = "0-unstable-2024-10-19"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "libretro-uae"; + rev = "c60e42ef9ad474518d4be859b7c1da2c0c7e1d6f"; + hash = "sha256-WCkz7BUgYaI+yRhPmNuOKGJC/GxV+n2aeJVn8vhx0Ng="; + }; + + makefile = "Makefile"; + + meta = { + description = "Amiga emulator based on WinUAE"; + homepage = "https://github.com/libretro/libretro-uae"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/quicknes.nix b/pkgs/applications/emulators/retroarch/cores/quicknes.nix new file mode 100644 index 000000000000..365a64725c7a --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/quicknes.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/same_cdi.nix b/pkgs/applications/emulators/retroarch/cores/same_cdi.nix new file mode 100644 index 000000000000..5a9611ac25a9 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/same_cdi.nix @@ -0,0 +1,44 @@ +{ + lib, + alsa-lib, + fetchFromGitHub, + gcc12Stdenv, + libGL, + libGLU, + mkLibretroCore, + portaudio, + python3, + xorg, +}: +mkLibretroCore { + core = "same_cdi"; + version = "0-unstable-2023-02-28"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "same_cdi"; + rev = "54cf493c2dee4c46666059c452f8aaaa0bd7c8e0"; + hash = "sha256-/+4coMzj/o82Q04Z65DQiPaykK6N56W6PRQLtyJOd8E="; + }; + + extraNativeBuildInputs = [ python3 ]; + extraBuildInputs = [ + alsa-lib + libGL + libGLU + portaudio + xorg.libX11 + ]; + # FIXME = build fail with GCC13: + # error = 'uint8_t' in namespace 'std' does not name a type; did you mean 'wint_t'? + stdenv = gcc12Stdenv; + + 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 + ]; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/sameboy.nix b/pkgs/applications/emulators/retroarch/cores/sameboy.nix new file mode 100644 index 000000000000..252976e3f85a --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/sameboy.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/scummvm.nix b/pkgs/applications/emulators/retroarch/cores/scummvm.nix new file mode 100644 index 000000000000..6bb0e08778cb --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/scummvm.nix @@ -0,0 +1,42 @@ +{ + lib, + fetchFromGitHub, + fluidsynth, + libGL, + libGLU, + libjpeg, + libvorbis, + mkLibretroCore, +}: +mkLibretroCore { + core = "scummvm"; + version = "0-unstable-2022-04-06"; + + # This is the old source code before they upstreamed the source code, + # so now the libretro related code lives in the scummvm/scummvm repository. + # However this broke the old way we were doing builds, so for now point + # to a mirror with the old source code until this issue is fixed. + # TODO: switch to libretro/scummvm since this is more up-to-date + src = fetchFromGitHub { + owner = "libretro-mirrors"; + repo = "scummvm"; + rev = "2fb2e4c551c9c1510c56f6e890ee0300b7b3fca3"; + hash = "sha256-wrlFqu+ONbYH4xMFDByOgySobGrkhVc7kYWI4JzA4ew="; + }; + + extraBuildInputs = [ + fluidsynth + libjpeg + libvorbis + libGLU + libGL + ]; + makefile = "Makefile"; + preConfigure = "cd backends/platform/libretro/build"; + + meta = { + description = "Libretro port of ScummVM"; + homepage = "https://github.com/libretro-mirrors/scummvm"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/smsplus-gx.nix b/pkgs/applications/emulators/retroarch/cores/smsplus-gx.nix new file mode 100644 index 000000000000..d0e9569bfc77 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/smsplus-gx.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/snes9x.nix b/pkgs/applications/emulators/retroarch/cores/snes9x.nix new file mode 100644 index 000000000000..9c977d2a4d08 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/snes9x.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "snes9x"; + version = "0-unstable-2024-10-28"; + + src = fetchFromGitHub { + owner = "snes9xgit"; + repo = "snes9x"; + rev = "fd05ca7df5259a2cd0aa9204f331e0b05126c376"; + hash = "sha256-o/Rb1XQ7QoI0hKROMFZ9igyH8NN3bMryvyU4oNUqtRA="; + }; + + makefile = "Makefile"; + preBuild = "cd libretro"; + + meta = { + description = "Port of SNES9x git to libretro"; + homepage = "https://github.com/snes9xgit/snes9x"; + license = lib.licenses.unfreeRedistributable; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/snes9x2002.nix b/pkgs/applications/emulators/retroarch/cores/snes9x2002.nix new file mode 100644 index 000000000000..1f76c95869d2 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/snes9x2002.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/snes9x2005.nix b/pkgs/applications/emulators/retroarch/cores/snes9x2005.nix new file mode 100644 index 000000000000..94e2f2440b18 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/snes9x2005.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/snes9x2010.nix b/pkgs/applications/emulators/retroarch/cores/snes9x2010.nix new file mode 100644 index 000000000000..a9e1f27911cd --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/snes9x2010.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore rec { + core = "snes9x2010"; + version = "0-unstable-2024-11-18"; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/stella.nix b/pkgs/applications/emulators/retroarch/cores/stella.nix new file mode 100644 index 000000000000..d3028ef6926b --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/stella.nix @@ -0,0 +1,26 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "stella"; + version = "0-unstable-2024-11-17"; + + src = fetchFromGitHub { + owner = "stella-emu"; + repo = "stella"; + rev = "0e2ce2771c7d0c9b2dd5c06e3a4746738d3c9e47"; + hash = "sha256-axt5wvH7WENh1ALPYc+f5XpCv2xPm5jYx26zMhLEt3E="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/stella2014.nix b/pkgs/applications/emulators/retroarch/cores/stella2014.nix new file mode 100644 index 000000000000..467f6f82882b --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/stella2014.nix @@ -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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/swanstation.nix b/pkgs/applications/emulators/retroarch/cores/swanstation.nix new file mode 100644 index 000000000000..092060008072 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/swanstation.nix @@ -0,0 +1,29 @@ +{ + lib, + cmake, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "swanstation"; + version = "0-unstable-2024-07-24"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "swanstation"; + rev = "37cd87e14ca09ac1b558e5b2c7db4ad256865bbb"; + hash = "sha256-dNIxlTPoY4S6VMtTN22ti3DE4aU/8XN/XhAo3DMNR/E="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/tgbdual.nix b/pkgs/applications/emulators/retroarch/cores/tgbdual.nix new file mode 100644 index 000000000000..5925125cee29 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/tgbdual.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "tgbdual"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "tgbdual-libretro"; + rev = "8d305769eebd67266c284558f9d3a30498894d3d"; + hash = "sha256-3mlnTgp43qC3yifpr6pvtC4vslddcf6mephKA183vEk="; + }; + + makefile = "Makefile"; + + meta = { + description = "Port of TGBDual to libretro"; + homepage = "https://github.com/libretro/tgbdual-libretro"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/thepowdertoy.nix b/pkgs/applications/emulators/retroarch/cores/thepowdertoy.nix new file mode 100644 index 000000000000..ae74646706e2 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/thepowdertoy.nix @@ -0,0 +1,27 @@ +{ + lib, + cmake, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "thepowdertoy"; + version = "0-unstable-2024-10-01"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "ThePowderToy"; + rev = "5d9c749780063b87bd62ddb025dee4241f196f26"; + hash = "sha256-BYeQ2WZgyvjDH5+akrVP5TlLq6Go3NKXB7zeR9oaaJ8="; + }; + + 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; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/tic80.nix b/pkgs/applications/emulators/retroarch/cores/tic80.nix new file mode 100644 index 000000000000..8799649b6653 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/tic80.nix @@ -0,0 +1,41 @@ +{ + lib, + cmake, + fetchFromGitHub, + mkLibretroCore, + pkg-config, +}: +mkLibretroCore { + core = "tic80"; + version = "0-unstable-2024-05-13"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "tic-80"; + rev = "6412f72d0f4725c153ce3d245729b829e713542e"; + hash = "sha256-RFp8sTSRwD+cgW3EYk3nBeY+zVKgZVQI5mjtfe2a64Q="; + fetchSubmodules = true; + }; + + extraNativeBuildInputs = [ + cmake + pkg-config + ]; + makefile = "Makefile"; + cmakeFlags = [ + "-DBUILD_LIBRETRO=ON" + "-DBUILD_DEMO_CARTS=OFF" + "-DBUILD_PRO=OFF" + "-DBUILD_PLAYER=OFF" + "-DBUILD_SDL=OFF" + "-DBUILD_SOKOL=OFF" + ]; + preConfigure = "cd core"; + postBuild = "cd lib"; + + meta = { + description = "Port of TIC-80 to libretro"; + homepage = "https://github.com/libretro/tic-80"; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/twenty-fortyeight.nix b/pkgs/applications/emulators/retroarch/cores/twenty-fortyeight.nix new file mode 100644 index 000000000000..5c9c39ac3a08 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/twenty-fortyeight.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "2048"; + version = "0-unstable-2024-06-28"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "libretro-2048"; + rev = "5474ed1ab880b3296c9860d0943d7de1970c79dd"; + hash = "sha256-i6bbxsLpSicDDGYKAxTMCMioHHfvBzVokun3PNYgDsc="; + }; + + meta = { + description = "Port of 2048 puzzle game to libretro"; + homepage = "https://github.com/libretro/libretro-2048"; + license = lib.licenses.unlicense; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/vba-m.nix b/pkgs/applications/emulators/retroarch/cores/vba-m.nix new file mode 100644 index 000000000000..04b25cbcedca --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/vba-m.nix @@ -0,0 +1,25 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "vbam"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "vbam-libretro"; + rev = "379dd97301458a51fb69dd93ba21b64f81e01ef2"; + hash = "sha256-UbXSHdKfa91MpcYityo+aILbI0DfkLqZh8YfGcRx/BI="; + }; + + makefile = "Makefile"; + preBuild = "cd src/libretro"; + + meta = { + description = "VBA-M libretro port"; + homepage = "https://github.com/libretro/vbam-libretro"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/vba-next.nix b/pkgs/applications/emulators/retroarch/cores/vba-next.nix new file mode 100644 index 000000000000..a0c9ee947e2d --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/vba-next.nix @@ -0,0 +1,22 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "vba-next"; + version = "0-unstable-2024-06-28"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "vba-next"; + rev = "2c726f25da75a5600ef5791ce904befe06c4dddd"; + hash = "sha256-Elb6cOm2oO+3fNUaTXLN4kyhftoJ/oWXD571mXApybs="; + }; + + meta = { + description = "VBA-M libretro port with modifications for speed"; + homepage = "https://github.com/libretro/vba-next"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/vecx.nix b/pkgs/applications/emulators/retroarch/cores/vecx.nix new file mode 100644 index 000000000000..0b2871528486 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/vecx.nix @@ -0,0 +1,29 @@ +{ + lib, + fetchFromGitHub, + libGL, + libGLU, + mkLibretroCore, +}: +mkLibretroCore { + core = "vecx"; + version = "0-unstable-2024-06-28"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "libretro-vecx"; + rev = "0e48a8903bd9cc359da3f7db783f83e22722c0cf"; + hash = "sha256-lB8NSaxDbN2qljhI0M/HFDuN0D/wMhFUQXhfSdGHsHU="; + }; + + extraBuildInputs = [ + libGL + libGLU + ]; + + meta = { + description = "VBA-M libretro port with modifications for speed"; + homepage = "https://github.com/libretro/libretro-vecx"; + license = lib.licenses.gpl3Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/virtualjaguar.nix b/pkgs/applications/emulators/retroarch/cores/virtualjaguar.nix new file mode 100644 index 000000000000..60b3ac75dd67 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/virtualjaguar.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "virtualjaguar"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "virtualjaguar-libretro"; + rev = "48096c1f6f8b98cfff048a5cb4e6a86686631072"; + hash = "sha256-DLBQQARHqupGGQS8YznDSSMuxQliyt5apGA4Ku2jlYo="; + }; + + makefile = "Makefile"; + + meta = { + description = "Port of VirtualJaguar to libretro"; + homepage = "https://github.com/libretro/virtualjaguar-libretro"; + license = lib.licenses.gpl3Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/cores/yabause.nix b/pkgs/applications/emulators/retroarch/cores/yabause.nix new file mode 100644 index 000000000000..a825ad01c7ce --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/yabause.nix @@ -0,0 +1,28 @@ +{ + lib, + stdenv, + fetchFromGitHub, + mkLibretroCore, +}: +mkLibretroCore { + core = "yabause"; + version = "0-unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "yabause"; + rev = "c35712c5ed33e18d77097f2059a036e19d1d66f2"; + hash = "sha256-4/gxWNPkGKBf4ti7ZF4GXgng6ZPyM9prrvK0S5tZ6V8="; + }; + + makefile = "Makefile"; + # Disable SSE for non-x86. DYNAREC doesn't build on aarch64. + makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "HAVE_SSE=0"; + preBuild = "cd yabause/src/libretro"; + + meta = { + description = "Port of Yabause to libretro"; + homepage = "https://github.com/libretro/yabause"; + license = lib.licenses.gpl2Only; + }; +} diff --git a/pkgs/applications/emulators/retroarch/hashes.json b/pkgs/applications/emulators/retroarch/hashes.json deleted file mode 100644 index 85ad2aa9e010..000000000000 --- a/pkgs/applications/emulators/retroarch/hashes.json +++ /dev/null @@ -1,903 +0,0 @@ -{ - "!comment": "Generated with update_cores.py script, do not edit!", - "2048": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "libretro-2048", - "rev": "5474ed1ab880b3296c9860d0943d7de1970c79dd", - "hash": "sha256-i6bbxsLpSicDDGYKAxTMCMioHHfvBzVokun3PNYgDsc=" - }, - "version": "unstable-2024-06-28" - }, - "atari800": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "libretro-atari800", - "rev": "6a18cb23cc4a7cecabd9b16143d2d7332ae8d44b", - "hash": "sha256-+cZXHtaXnpU/zCwiDtjkyNMFGDahiHzqV2FoTCRnUWE=" - }, - "version": "unstable-2024-10-31" - }, - "beetle-gba": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-gba-libretro", - "rev": "6cee80685f735ea6c2373db2622a1f1ee9f39d39", - "hash": "sha256-a3XgExXVCUFw3GLCUkEl6now2L8qVdNOaXvrDMcT1ZE=" - }, - "version": "unstable-2024-10-21" - }, - "beetle-lynx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-lynx-libretro", - "rev": "7fead71b49e0f08be5c4d4224fea73c6174763bf", - "hash": "sha256-fYBx/bjbhRXoVIGnEg4/oMVm705ivL1os+FfVQLRSyI=" - }, - "version": "unstable-2024-10-21" - }, - "beetle-ngp": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-ngp-libretro", - "rev": "139fe34c8dfc5585d6ee1793a7902bca79d544de", - "hash": "sha256-ruWnCgMxfpPHTWQ7vgNUczmGRzNKKhoZTNlUcNgm4T8=" - }, - "version": "unstable-2024-10-21" - }, - "beetle-pce": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-pce-libretro", - "rev": "af28fb0385d00e0292c4703b3aa7e72762b564d2", - "hash": "sha256-W+74RTIidSUdviihLy926OvlSdqMECvOLEEiWMtB50w=" - }, - "version": "unstable-2024-11-15" - }, - "beetle-pce-fast": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-pce-fast-libretro", - "rev": "931586f0512663f625a6e981d3047a6620281ab5", - "hash": "sha256-9Nne4upiQNSAlTZsyXcLNIwN8MMKUO1ycahowYW1sWg=" - }, - "version": "unstable-2024-11-15" - }, - "beetle-pcfx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-pcfx-libretro", - "rev": "dd04cef9355286488a1d78ff18c4c848a1575540", - "hash": "sha256-oFBuriCbJWjgPH9RRAM/XUvkW0gKXnvs7lmBpJpWewo=" - }, - "version": "unstable-2024-10-21" - }, - "beetle-psx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-psx-libretro", - "rev": "1068cb8dbd6f312664ecf5901625cab4a6533204", - "hash": "sha256-ioAnpz6OkHWPaYE0uTEvnHV+vGzq02bQ4oUP8jW6/YA=" - }, - "version": "unstable-2024-11-15" - }, - "beetle-saturn": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-saturn-libretro", - "rev": "0a78a9a5ab0088ba19f21e028dda9f4b4d7c9e48", - "hash": "sha256-WNQhtaYBg7JqPdxcD0cLRjr2pSda6Xmx/WWYzyu5u9c=" - }, - "version": "unstable-2024-10-21" - }, - "beetle-supafaust": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "supafaust", - "rev": "e25f66765938d33f9ad5850e8d6cd597e55b7299", - "hash": "sha256-ZgOXHhEHt54J2B1q6uA8v6uOK53g7idJlgoC4guTGow=" - }, - "version": "unstable-2024-10-01" - }, - "beetle-supergrafx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-supergrafx-libretro", - "rev": "a776133c34ae8da5daf7d9ccb43e3e292e2b07b0", - "hash": "sha256-FemWW4EPQCwhrS7YEytf6fEeimdTTfzaDdyRNDIBQyk=" - }, - "version": "unstable-2024-11-15" - }, - "beetle-vb": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-vb-libretro", - "rev": "8f837ebc077afdd6652efb2827fd8308a07113ca", - "hash": "sha256-eAnBubNhj78G4r8OHVqwFXGOSA9wEYI6ZwNyiwDW8W8=" - }, - "version": "unstable-2024-10-21" - }, - "beetle-wswan": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "beetle-wswan-libretro", - "rev": "2aeb47d3a58bf0360c686f842d9bb5bd201306fe", - "hash": "sha256-LrF9p5tPtUamVLC41bJxcYDKvHmhVfwMieyIAdHaGmU=" - }, - "version": "unstable-2024-10-21" - }, - "blastem": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "blastem", - "rev": "277e4a62668597d4f59cadda1cbafb844f981d45", - "hash": "sha256-EHvKElPw8V5Z6LnMaQXBCdM4niLIlF3aBm8dRbeYXHs=" - }, - "version": "unstable-2022-07-26" - }, - "bluemsx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "bluemsx-libretro", - "rev": "01ce142ccb85c302420cb962d1b6e6a68a6ce076", - "hash": "sha256-h3Zpv+h6CbM1pdSOXsjN0pFUjXLn5T/R5W55VZXpMVM=" - }, - "version": "unstable-2024-10-22" - }, - "bsnes": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "bsnes-libretro", - "rev": "20c55eb6333a11395ba637df8583066483e58cb2", - "hash": "sha256-IP00xtxS3wwnQSmYltrX8GEHZX/65xnx2EsmQlE1VZM=" - }, - "version": "unstable-2024-09-06" - }, - "bsnes-hd": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "DerKoun", - "repo": "bsnes-hd", - "rev": "0bb7b8645e22ea2476cabd58f32e987b14686601", - "hash": "sha256-YzWSZMn6v5hWIHnp6KmmpevCsf35Vi2BCcmFMnrFPH0=" - }, - "version": "unstable-2024-10-21" - }, - "bsnes-mercury": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "bsnes-mercury", - "rev": "0f35d044bf2f2b879018a0500e676447e93a1db1", - "hash": "sha256-skVREKYITZn+gKKSZmwuBCWrG0jb/pifwIgat8VyQ8U=" - }, - "version": "unstable-2024-10-21" - }, - "citra": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "citra", - "rev": "2d67658e85de4767c0eefeb2829d710401c5c802", - "hash": "sha256-u2XwAudFgI7j/k6Bq5fk874aI6KpZawlBoIs2+M+eZY=", - "fetchSubmodules": true - }, - "version": "unstable-2024-01-24" - }, - "desmume": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "desmume", - "rev": "7f05a8d447b00acd9e0798aee97b4f72eb505ef9", - "hash": "sha256-BttWMunVbfPOTGx+DV+3QyOwW+55tgXKVIn99DZhbBI=" - }, - "version": "unstable-2024-10-21" - }, - "desmume2015": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "desmume2015", - "rev": "af397ff3d1f208c27f3922cc8f2b8e08884ba893", - "hash": "sha256-kEb+og4g7rJvCinBZKcb42geZO6W8ynGsTG9yqYgI+U=" - }, - "version": "unstable-2022-04-05" - }, - "dolphin": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "dolphin", - "rev": "89a4df725d4eb24537728f7d655cddb1add25c18", - "hash": "sha256-f9O3//EuoCSPQC7GWmf0EzAEpjoKof30kIDBCDw0dbs=" - }, - "version": "unstable-2024-04-19" - }, - "dosbox": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "dosbox-libretro", - "rev": "b7b24262c282c0caef2368c87323ff8c381b3102", - "hash": "sha256-PG2eElenlEpu0U/NIh53p0uLqewnEdaq6Aoak5E1P3I=" - }, - "version": "unstable-2022-07-18" - }, - "dosbox-pure": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "schellingb", - "repo": "dosbox-pure", - "rev": "39dd77adff71cd2ae17d80a0e48fad8583ade8e4", - "hash": "sha256-ZC3JX4BG+FUR/lcEUupISz1s8Q0AdqkO4XVIPi1L5vg=" - }, - "version": "unstable-2024-11-16" - }, - "easyrpg": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "EasyRPG", - "repo": "Player", - "rev": "f8e41f43b619413f95847536412b56f85307d378", - "hash": "sha256-nvWM4czTv/GxY9raomBEn7dmKBeLtSA9nvjMJxc3Q8s=", - "fetchSubmodules": true - }, - "version": "unstable-2023-04-29" - }, - "eightyone": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "81-libretro", - "rev": "ffc99f27f092addc9ddd34dd0e3a3d4d1c053cbf", - "hash": "sha256-3AIXk3LJHZHWIojMeo2BJHWYDHQ17WVbkwjFhXM14ZE=" - }, - "version": "unstable-2024-10-21" - }, - "fbalpha2012": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "fbalpha2012", - "rev": "77167cea72e808384c136c8c163a6b4975ce7a84", - "hash": "sha256-giEV09dT/e82bmDlRkxpkW04JcsEZc/enIPecqYtg3c=" - }, - "version": "unstable-2024-10-21" - }, - "fbneo": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "fbneo", - "rev": "d72f49f4a45dbfc5a855956d1a75ce2d0601c1c5", - "hash": "sha256-+T+HQo6IfY8+oE/mOg54Vn9NhasGYNCLXksFdSDT/xE=" - }, - "version": "unstable-2024-10-03" - }, - "fceumm": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "libretro-fceumm", - "rev": "9f53af4e332476ba99d0c056668fbb35cfb527c3", - "hash": "sha256-sTzjIuEBTKt2rZfSadQa1pDLFclLL/vwjgkTMK1ZzPQ=" - }, - "version": "unstable-2024-10-16" - }, - "flycast": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "flyinghead", - "repo": "flycast", - "rev": "d618abc3205fe185b26afe58eb5472b800ae0b42", - "hash": "sha256-hlYu1RXfzDHJh5nqBQkcwjrLtFV5AIxdBw5PZn0SUNg=", - "fetchSubmodules": true - }, - "version": "unstable-2024-11-17" - }, - "fmsx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "fmsx-libretro", - "rev": "9eb5f25df5397212a3e3088ca1a64db0740bbe5f", - "hash": "sha256-Pac1tQvPxYETU+fYU17moBHGfjNtzZiOsOms1uFQAmE=" - }, - "version": "unstable-2024-10-21" - }, - "freeintv": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "freeintv", - "rev": "beab9af119fc117833d2d866d8d4ea0857ec0236", - "hash": "sha256-+3hF7OZ2OD8K3OsvzJ3+Nn3DwC7PfD+Mr3Ku2/W/fDQ=" - }, - "version": "unstable-2024-10-21" - }, - "fuse": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "fuse-libretro", - "rev": "99df66eac096400d4d6d8fae2215192b6f03277e", - "hash": "sha256-o8FbDxke2JCUlmDZEHxMBY4f/WyHm1J76R43w+LVJfM=" - }, - "version": "unstable-2024-11-18" - }, - "gambatte": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "gambatte-libretro", - "rev": "3eeb65e9bcf4b2a7ca24c5cebdfa7e342177ef0f", - "hash": "sha256-tNGMR6GIyXen9+Ktg3IvYTcPidc+5Z8TpBQu1YgmqlY=" - }, - "version": "unstable-2024-10-04" - }, - "genesis-plus-gx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "Genesis-Plus-GX", - "rev": "7de0f0b6cde9bda1235b448aa607044b3f80ab3c", - "hash": "sha256-W06vSrGKbXMcXIouW9/fD93sBfwREqIL8HvB3kan0tM=" - }, - "version": "unstable-2024-09-18" - }, - "gpsp": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "gpsp", - "rev": "36061caf8cc5e15c3c92fb772b6b8560c7c59ec7", - "hash": "sha256-o36OUdgm7p+rAMN6R2e2Lqi4oBLTyxziw7Lr20ERBg0=" - }, - "version": "unstable-2024-10-21" - }, - "gw": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "gw-libretro", - "rev": "435e5cfd4bf6aea03a84259e9b8dba3daf3ff5bd", - "hash": "sha256-csaOqrZMSk9xZUlGAKgypV38q9XE7K6hLLdBC10g9Ao=" - }, - "version": "unstable-2024-10-21" - }, - "handy": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "libretro-handy", - "rev": "4e9e072796e5552a9d57f6ab83b3f85f27b17fb6", - "hash": "sha256-ThzFEqLCX2JC06n6GZgkGzX5sFY5CxFDjkeekXRmbXY=" - }, - "version": "unstable-2024-10-21" - }, - "hatari": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "hatari", - "rev": "7008194d3f951a157997f67a820578f56f7feee0", - "hash": "sha256-ZPzwUBaxs2ivE9n9cb5XB5mhixY9b6qIlq7OiVSLbqg=" - }, - "version": "unstable-2024-10-21" - }, - "mame": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mame", - "rev": "a67797ad2f7516906ed7acef87569c6f35ca8739", - "hash": "sha256-MF6MWQftHBYL1Uv3ZYKFqCH24nd1+M73rhUzkdftMzk=", - "fetchSubmodules": true - }, - "version": "unstable-2024-11-01" - }, - "mame2000": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mame2000-libretro", - "rev": "2ec60f6e1078cf9ba173e80432cc28fd4eea200f", - "hash": "sha256-AYZj7bvO9oc7wmEBbj6DPRzpQFHl8diIcunSSpD4Vok=" - }, - "version": "unstable-2024-07-01" - }, - "mame2003": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mame2003-libretro", - "rev": "6d543115531fc96422b73c989a628600cacbea50", - "hash": "sha256-jFzFQVB0uiSRa82sq1fiMEXyzzDJqRANNgq5hj/ZAl4=" - }, - "version": "unstable-2024-11-10" - }, - "mame2003-plus": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mame2003-plus-libretro", - "rev": "b00ea1c9574126d75ae7b80c3b41e1186421fc1d", - "hash": "sha256-Zq4P5UsZh3p9/zasfTC+pzWiLAo7T2qAgZw4bJ4ADdM=" - }, - "version": "unstable-2024-11-19" - }, - "mame2010": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mame2010-libretro", - "rev": "c5b413b71e0a290c57fc351562cd47ba75bac105", - "hash": "sha256-p+uEhxjr/07YJxInhW7oJDr8KurD36JxnSfJo17FOxM=" - }, - "version": "unstable-2024-10-23" - }, - "mame2015": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mame2015-libretro", - "rev": "316cd06349f2b34b4719f04f7c0d07569a74c764", - "hash": "sha256-CBN04Jf26SIk8mKWlui5spQGokBvgFUCvFiC8NoBGw0=" - }, - "version": "unstable-2023-11-01" - }, - "mame2016": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mame2016-libretro", - "rev": "01058613a0109424c4e7211e49ed83ac950d3993", - "hash": "sha256-IsM7f/zlzvomVOYlinJVqZllUhDfy4NNTeTPtNmdVak=" - }, - "version": "unstable-2022-04-06" - }, - "melonds": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "melonds", - "rev": "7a3c11ff970cd36ca806961fae6db94b30dd5401", - "hash": "sha256-YGkRdth7qdATcZpJkBd5MGOJFG1AbeJhAnyir+ssZYA=" - }, - "version": "unstable-2024-10-21" - }, - "mesen": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mesen", - "rev": "791c5e8153ee6e29691d45b5df2cf1151ff416f9", - "hash": "sha256-PEEGJsyT+D/JwBxH2H9OY2MwaGt1i+1kmDZUT6zROic=" - }, - "version": "unstable-2024-10-21" - }, - "mesen-s": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mesen-s", - "rev": "d4fca31a6004041d99b02199688f84c009c55967", - "hash": "sha256-mGGTLBRJCsNJg57LWSFndIv/LLzEmVRnv6gNbllkV/Y=" - }, - "version": "unstable-2024-10-21" - }, - "meteor": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "meteor-libretro", - "rev": "e533d300d0561564451bde55a2b73119c768453c", - "hash": "sha256-zMkgzUz2rk0SD5ojY4AqaDlNM4k4QxuUxVBRBcn6TqQ=" - }, - "version": "unstable-2020-12-28" - }, - "mgba": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mgba", - "rev": "747362c02d2e71ee7c363e8dcb240925be8af906", - "hash": "sha256-dBhdS6C1H02iwdYDVvJmkPWob81vpmQJdHUHJFAq2vo=" - }, - "version": "unstable-2024-11-12" - }, - "mrboom": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "Javanaise", - "repo": "mrboom-libretro", - "rev": "22765ce7176d236d846f504318a51c448d2b469b", - "hash": "sha256-hzdc4PM/EARNEtpeATo4VohXtkeBra6rCz3tdIgBfVw=", - "fetchSubmodules": true - }, - "version": "unstable-2024-07-01" - }, - "mupen64plus": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "mupen64plus-libretro-nx", - "rev": "4249e39b2c200e5f0895385f76d99928785f2bea", - "hash": "sha256-nII/PMYo2xLznmAcKs6jDWGRS1DC3tiDeT6KJKRnaCI=" - }, - "version": "unstable-2024-10-29" - }, - "neocd": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "neocd_libretro", - "rev": "5eca2c8fd567b5261251c65ecafa8cf5b179d1d2", - "hash": "sha256-72tmPCb7AXsamaQsMAPiYpgDR8DER2GTz4hcbN8wy7g=" - }, - "version": "unstable-2024-10-21" - }, - "nestopia": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "nestopia", - "rev": "b932740e8abbe2cda80d06b083fdd8115af1c5d5", - "hash": "sha256-lIWk3V93vTKZM/jvfLkA06c7DDSEQtLmqRzJUi0TK/4=" - }, - "version": "unstable-2024-10-17" - }, - "np2kai": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "AZO234", - "repo": "NP2kai", - "rev": "4b109eaac4f79b04065ff5025319fce51537e04d", - "hash": "sha256-tRFvK8d5Y/umy/b1BKN85ZSaDWyK95hII4RVng7A5uU=", - "fetchSubmodules": true - }, - "version": "unstable-2024-11-03" - }, - "nxengine": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "nxengine-libretro", - "rev": "9adc032a5f6aa913d71d22042bb72cb11cf0f4a2", - "hash": "sha256-8XjZp18lQU3xFNDjIuNsSHn7Mhba8Lze/IeRsy8/U1U=" - }, - "version": "unstable-2024-10-21" - }, - "o2em": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "libretro-o2em", - "rev": "c8f458d035392963823fbb50db0cec0033d9315f", - "hash": "sha256-riqMXm+3BG4Gz0wrmVFxtVhuMRtZHZqCViAupp/Q42U=" - }, - "version": "unstable-2024-06-28" - }, - "opera": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "opera-libretro", - "rev": "67a29e60a4d194b675c9272b21b61eaa022f3ba3", - "hash": "sha256-8896EWNbzVyr3MS1jtWD3pLur7ZvAhhJmrwkW3ayzkU=" - }, - "version": "unstable-2024-10-17" - }, - "parallel-n64": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "parallel-n64", - "rev": "e372c5e327dcd649e9d840ffc3d88480b6866eda", - "hash": "sha256-q4octB5XDdl4PtLYVZfBgydVBNaOwzu9dPBY+Y68lVo=" - }, - "version": "unstable-2024-10-21" - }, - "pcsx2": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "lrps2", - "rev": "f3c8743d6a42fe429f703b476fecfdb5655a98a9", - "hash": "sha256-0piCNWX7QbZ58KyTlWp4h1qLxXpi1z6ML8sBHMTvCY4=" - }, - "version": "unstable-2023-01-30" - }, - "pcsx_rearmed": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "pcsx_rearmed", - "rev": "e3d7ea45c75f2752e351d5c5b54cf7e79e66d26e", - "hash": "sha256-dJqomyUHYQ+vpyu7/w2S/NidgYbHiGBWjebFQAXjzI0=" - }, - "version": "unstable-2024-11-17" - }, - "picodrive": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "picodrive", - "rev": "0daf92b57fba1fdbc124651573e88373eef28aa5", - "hash": "sha256-rvgcGNpHhjHpg5q6qiu08lBn+Zjx87E5/Q98gPoffhE=", - "fetchSubmodules": true - }, - "version": "unstable-2024-10-19" - }, - "play": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "jpd002", - "repo": "Play-", - "rev": "c3cba5418b4e5618befd9c2790498cf3cf88372a", - "hash": "sha256-xO2Pgl1E0JFEsthTmG+Ka+NqOTWG/JeeAIa6wBWXJyc=", - "fetchSubmodules": true - }, - "version": "unstable-2024-11-14" - }, - "ppsspp": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "hrydgard", - "repo": "ppsspp", - "rev": "2402eea4b16908ad59079bcf3fab06ba63531a3c", - "hash": "sha256-bpeiZdcXkGWLFZOsxTGuVmo4xAiUb9v5Wf6pWkt5JV0=", - "fetchSubmodules": true - }, - "version": "unstable-2024-11-15" - }, - "prboom": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "libretro-prboom", - "rev": "d25ccfb9739069824d8fff99e3ae78a58a09df01", - "hash": "sha256-IaMreS2MSkFdZ3Jff2FOZBvKIIa4KIkp41LIg3PLl44=" - }, - "version": "unstable-2024-10-21" - }, - "prosystem": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "prosystem-libretro", - "rev": "acae250da8d98b8b9707cd499e2a0bf6d8500652", - "hash": "sha256-AGF3K3meZEEsnzHmMTCsFXBGNvWVELH8a8qET07kP0o=" - }, - "version": "unstable-2024-10-21" - }, - "puae": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "libretro-uae", - "rev": "c60e42ef9ad474518d4be859b7c1da2c0c7e1d6f", - "hash": "sha256-WCkz7BUgYaI+yRhPmNuOKGJC/GxV+n2aeJVn8vhx0Ng=" - }, - "version": "unstable-2024-10-19" - }, - "quicknes": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "QuickNES_Core", - "rev": "dbf19f73e3eb9701d1c7f5898f57c097e05c9fbd", - "hash": "sha256-oFQUMp1imc8JCsQYCy1BtIUmTC+u0VcoYHpWzUpKNb4=" - }, - "version": "unstable-2024-10-21" - }, - "same_cdi": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "same_cdi", - "rev": "54cf493c2dee4c46666059c452f8aaaa0bd7c8e0", - "hash": "sha256-/+4coMzj/o82Q04Z65DQiPaykK6N56W6PRQLtyJOd8E=" - }, - "version": "unstable-2023-02-28" - }, - "sameboy": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "sameboy", - "rev": "51433012a871a44555492273fd22f29867d12655", - "hash": "sha256-vPT2uRGbXmJ62yig/yk485/TxEEKHJeWdNrM2c0IjKw=" - }, - "version": "unstable-2024-06-28" - }, - "scummvm": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro-mirrors", - "repo": "scummvm", - "rev": "2fb2e4c551c9c1510c56f6e890ee0300b7b3fca3", - "hash": "sha256-wrlFqu+ONbYH4xMFDByOgySobGrkhVc7kYWI4JzA4ew=" - }, - "version": "unstable-2022-04-06" - }, - "smsplus-gx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "smsplus-gx", - "rev": "c642bbd0680b5959180a420036108893d0aec961", - "hash": "sha256-SHBrwzLyVZ4Tp/kVCnr4xj2B3pmdg+JUmZUM7hYao64=" - }, - "version": "unstable-2024-10-21" - }, - "snes9x": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "snes9xgit", - "repo": "snes9x", - "rev": "fd05ca7df5259a2cd0aa9204f331e0b05126c376", - "hash": "sha256-o/Rb1XQ7QoI0hKROMFZ9igyH8NN3bMryvyU4oNUqtRA=" - }, - "version": "unstable-2024-10-28" - }, - "snes9x2002": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "snes9x2002", - "rev": "a0709ec7dcd6de2fbebb43106bd757b649e3b7cf", - "hash": "sha256-rrMPhXIsQ48fVvjgZgC3xeqm9k9kwe43oZNzs2d/h1Q=" - }, - "version": "unstable-2024-10-21" - }, - "snes9x2005": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "snes9x2005", - "rev": "74d871db9b4dba6dbe6c5ecebc88cbf255be5349", - "hash": "sha256-YlRMjSEo9sdLVRzWGSJlnBeqg6wUhZi8l3ffzUaKQIQ=" - }, - "version": "unstable-2024-10-21" - }, - "snes9x2010": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "snes9x2010", - "rev": "f9ae8fd28b13070a945a829ccf41cbf90a21d0f7", - "hash": "sha256-nsExAYnzDenPvXzeN60jGykRTrCGMi/mRPV+vgS8ZtE=" - }, - "version": "unstable-2024-11-18" - }, - "stella": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "stella-emu", - "repo": "stella", - "rev": "0e2ce2771c7d0c9b2dd5c06e3a4746738d3c9e47", - "hash": "sha256-axt5wvH7WENh1ALPYc+f5XpCv2xPm5jYx26zMhLEt3E=" - }, - "version": "unstable-2024-11-17" - }, - "stella2014": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "stella2014-libretro", - "rev": "3cc89f0d316d6c924a5e3f4011d17421df58e615", - "hash": "sha256-2gnFWau7F45SdzoqDUlqYXfXVE1EUPozHZv7BhyRRIA=" - }, - "version": "unstable-2024-10-21" - }, - "swanstation": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "swanstation", - "rev": "37cd87e14ca09ac1b558e5b2c7db4ad256865bbb", - "hash": "sha256-dNIxlTPoY4S6VMtTN22ti3DE4aU/8XN/XhAo3DMNR/E=" - }, - "version": "unstable-2024-07-24" - }, - "tgbdual": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "tgbdual-libretro", - "rev": "8d305769eebd67266c284558f9d3a30498894d3d", - "hash": "sha256-3mlnTgp43qC3yifpr6pvtC4vslddcf6mephKA183vEk=" - }, - "version": "unstable-2024-10-21" - }, - "thepowdertoy": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "ThePowderToy", - "rev": "5d9c749780063b87bd62ddb025dee4241f196f26", - "hash": "sha256-BYeQ2WZgyvjDH5+akrVP5TlLq6Go3NKXB7zeR9oaaJ8=" - }, - "version": "unstable-2024-10-01" - }, - "tic80": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "tic-80", - "rev": "6412f72d0f4725c153ce3d245729b829e713542e", - "hash": "sha256-RFp8sTSRwD+cgW3EYk3nBeY+zVKgZVQI5mjtfe2a64Q=", - "fetchSubmodules": true - }, - "version": "unstable-2024-05-13" - }, - "vba-m": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "vbam-libretro", - "rev": "379dd97301458a51fb69dd93ba21b64f81e01ef2", - "hash": "sha256-UbXSHdKfa91MpcYityo+aILbI0DfkLqZh8YfGcRx/BI=" - }, - "version": "unstable-2024-10-21" - }, - "vba-next": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "vba-next", - "rev": "2c726f25da75a5600ef5791ce904befe06c4dddd", - "hash": "sha256-Elb6cOm2oO+3fNUaTXLN4kyhftoJ/oWXD571mXApybs=" - }, - "version": "unstable-2024-06-28" - }, - "vecx": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "libretro-vecx", - "rev": "0e48a8903bd9cc359da3f7db783f83e22722c0cf", - "hash": "sha256-lB8NSaxDbN2qljhI0M/HFDuN0D/wMhFUQXhfSdGHsHU=" - }, - "version": "unstable-2024-06-28" - }, - "virtualjaguar": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "virtualjaguar-libretro", - "rev": "48096c1f6f8b98cfff048a5cb4e6a86686631072", - "hash": "sha256-DLBQQARHqupGGQS8YznDSSMuxQliyt5apGA4Ku2jlYo=" - }, - "version": "unstable-2024-10-21" - }, - "yabause": { - "fetcher": "fetchFromGitHub", - "src": { - "owner": "libretro", - "repo": "yabause", - "rev": "c35712c5ed33e18d77097f2059a036e19d1d66f2", - "hash": "sha256-4/gxWNPkGKBf4ti7ZF4GXgng6ZPyM9prrvK0S5tZ6V8=" - }, - "version": "unstable-2024-10-21" - } -} diff --git a/pkgs/applications/emulators/retroarch/mkLibretroCore.nix b/pkgs/applications/emulators/retroarch/mkLibretroCore.nix index bf933bf70159..42124cb23609 100644 --- a/pkgs/applications/emulators/retroarch/mkLibretroCore.nix +++ b/pkgs/applications/emulators/retroarch/mkLibretroCore.nix @@ -1,19 +1,22 @@ -{ lib -, stdenv -, core -, repo -, makeWrapper -, retroarch -, zlib -, makefile ? "Makefile.libretro" -, extraBuildInputs ? [ ] -, extraNativeBuildInputs ? [ ] - # Location of resulting RetroArch core on $out -, libretroCore ? "/lib/retroarch/cores" - # The core filename is derivated from the core name - # Setting `normalizeCore` to `true` will convert `-` to `_` on the core filename -, normalizeCore ? true -, ... +{ + # Deps + lib, + stdenv, + makeWrapper, + retroarchBare, + unstableGitUpdater, + zlib, + # Params + core, + makefile ? "Makefile.libretro", + extraBuildInputs ? [ ], + extraNativeBuildInputs ? [ ], + ## Location of resulting RetroArch core on $out + libretroCore ? "/lib/retroarch/cores", + ## The core filename is derivated from the core name + ## Setting `normalizeCore` to `true` will convert `-` to `_` on the core filename + normalizeCore ? true, + ... }@args: let @@ -24,62 +27,74 @@ let extraArgs = builtins.removeAttrs args [ "lib" "stdenv" - "core" "makeWrapper" - "retroarch" + "retroarchBare" + "unstableGitUpdater" "zlib" + + "core" "makefile" "extraBuildInputs" "extraNativeBuildInputs" "libretroCore" "normalizeCore" - "makeFlags" - "meta" ]; in -stdenv.mkDerivation ({ - pname = "libretro-${core}"; +stdenv.mkDerivation ( + { + pname = "libretro-${core}"; - buildInputs = [ zlib ] ++ extraBuildInputs; - nativeBuildInputs = [ makeWrapper ] ++ extraNativeBuildInputs; + buildInputs = [ zlib ] ++ extraBuildInputs; + nativeBuildInputs = [ makeWrapper ] ++ extraNativeBuildInputs; - inherit makefile; + inherit makefile; - makeFlags = [ - "platform=${{ - linux = "unix"; - darwin = "osx"; - windows = "win"; - }.${stdenv.hostPlatform.parsed.kernel.name} or stdenv.hostPlatform.parsed.kernel.name}" - "ARCH=${{ - armv7l = "arm"; - armv6l = "arm"; - aarch64 = "arm64"; - i686 = "x86"; - }.${stdenv.hostPlatform.parsed.cpu.name} or stdenv.hostPlatform.parsed.cpu.name}" - ] ++ (args.makeFlags or [ ]); + makeFlags = [ + "platform=${ + { + linux = "unix"; + darwin = "osx"; + windows = "win"; + } + .${stdenv.hostPlatform.parsed.kernel.name} or stdenv.hostPlatform.parsed.kernel.name + }" + "ARCH=${ + { + armv7l = "arm"; + armv6l = "arm"; + aarch64 = "arm64"; + i686 = "x86"; + } + .${stdenv.hostPlatform.parsed.cpu.name} or stdenv.hostPlatform.parsed.cpu.name + }" + ] ++ (args.makeFlags or [ ]); - installPhase = '' - runHook preInstall + installPhase = '' + runHook preInstall - install -Dt ${coreDir} ${coreFilename} - makeWrapper ${retroarch}/bin/retroarch $out/bin/${mainProgram} \ - --add-flags "-L ${coreDir}/${coreFilename}" + install -Dt ${coreDir} ${coreFilename} + makeWrapper ${retroarchBare}/bin/retroarch $out/bin/${mainProgram} \ + --add-flags "-L ${coreDir}/${coreFilename}" - runHook postInstall - ''; + runHook postInstall + ''; - enableParallelBuilding = true; + enableParallelBuilding = true; - passthru = { - inherit core libretroCore; - updateScript = [ ./update_cores.py repo ]; - }; + passthru = { + inherit core libretroCore; + updateScript = unstableGitUpdater { }; + } // (args.passthru or { }); - meta = with lib; { - inherit mainProgram; - inherit (retroarch.meta) platforms; - homepage = "https://www.libretro.com/"; - maintainers = with maintainers; teams.libretro.members ++ [ hrdinka ]; - } // (args.meta or { }); -} // extraArgs) + meta = + with lib; + { + inherit mainProgram; + inherit (retroarchBare.meta) platforms; + homepage = "https://www.libretro.com/"; + maintainers = with maintainers; teams.libretro.members; + } + // (args.meta or { }); + } + // extraArgs +) diff --git a/pkgs/applications/emulators/retroarch/update_cores.py b/pkgs/applications/emulators/retroarch/update_cores.py deleted file mode 100755 index 4e15315ce726..000000000000 --- a/pkgs/applications/emulators/retroarch/update_cores.py +++ /dev/null @@ -1,233 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -I nixpkgs=./ -i python3 -p "python3.withPackages (ps: with ps; [ ])" -p git -p nix-prefetch-github -p nix-prefetch-git -p nix-prefetch-scripts - -import json -import os -import subprocess -import sys -from concurrent.futures import ThreadPoolExecutor -from pathlib import Path - -SCRIPT_PATH = Path(__file__).absolute().parent -HASHES_PATH = SCRIPT_PATH / "hashes.json" -GET_REPO_THREADS = int(os.environ.get("GET_REPO_THREADS", 8)) -# To add a new core, add it to the dictionary below. You need to set at least -# `repo`, that is the repository name if the owner of the repository is -# `libretro` itself, otherwise also set `owner`. -# You may set `deep_clone`, `fetch_submodules` or `leave_dot_git` options to -# `True` and they're similar to `fetchgit` options. Also if for some reason you -# need to pin a specific revision, set `rev` to a commit. -# There is also a `fetcher` option that for now only supports `fetchFromGitHub` -# (see `get_repo_hash()`), but it may be extended in the future if there is a -# need to support fetchers from other source hubs. -# To generate the hash file for your new core, you can run -# `/pkgs/applications/emulators/retroarch/update_cores.py `. Do -# not forget to add your core to `cores.nix` file with the proper overrides so -# the core can be build. -CORES = { - "2048": {"repo": "libretro-2048"}, - "atari800": {"repo": "libretro-atari800"}, - "beetle-gba": {"repo": "beetle-gba-libretro"}, - "beetle-lynx": {"repo": "beetle-lynx-libretro"}, - "beetle-ngp": {"repo": "beetle-ngp-libretro"}, - "beetle-pce": {"repo": "beetle-pce-libretro"}, - "beetle-pce-fast": {"repo": "beetle-pce-fast-libretro"}, - "beetle-pcfx": {"repo": "beetle-pcfx-libretro"}, - "beetle-psx": {"repo": "beetle-psx-libretro"}, - "beetle-saturn": {"repo": "beetle-saturn-libretro"}, - "beetle-supafaust": {"repo": "supafaust"}, - "beetle-supergrafx": {"repo": "beetle-supergrafx-libretro"}, - "beetle-vb": {"repo": "beetle-vb-libretro"}, - "beetle-wswan": {"repo": "beetle-wswan-libretro"}, - "blastem": {"repo": "blastem"}, - "bluemsx": {"repo": "bluemsx-libretro"}, - "bsnes": {"repo": "bsnes-libretro"}, - "bsnes-hd": {"repo": "bsnes-hd", "owner": "DerKoun"}, - "bsnes-mercury": {"repo": "bsnes-mercury"}, - "citra": {"repo": "citra", "fetch_submodules": True}, - "desmume": {"repo": "desmume"}, - "desmume2015": {"repo": "desmume2015"}, - "dolphin": {"repo": "dolphin"}, - "dosbox": {"repo": "dosbox-libretro"}, - "dosbox-pure": {"repo": "dosbox-pure", "owner": "schellingb"}, - # The EasyRPG core is pinned to 0.8 since it depends on version 0.8 of liblcf, which - # was released in April 2023. - # Update the version when a compatible liblcf is available. - # See pkgs/games/easyrpg-player/default.nix for details. - "easyrpg": {"repo": "Player", "owner": "EasyRPG", "fetch_submodules": True, "rev": "0.8"}, - "eightyone": {"repo": "81-libretro"}, - "fbalpha2012": {"repo": "fbalpha2012"}, - "fbneo": {"repo": "fbneo"}, - "fceumm": {"repo": "libretro-fceumm"}, - "flycast": {"repo": "flycast", "owner": "flyinghead", "fetch_submodules": True}, - "fmsx": {"repo": "fmsx-libretro"}, - "freeintv": {"repo": "freeintv"}, - "fuse": {"repo": "fuse-libretro"}, - "gambatte": {"repo": "gambatte-libretro"}, - "genesis-plus-gx": {"repo": "Genesis-Plus-GX"}, - "gpsp": {"repo": "gpsp"}, - "gw": {"repo": "gw-libretro"}, - "handy": {"repo": "libretro-handy"}, - "hatari": {"repo": "hatari"}, - # Setting fetch_submodules=True since libretro/mame constantly gives - # different hashes for its tarballs, see: - # - https://github.com/NixOS/nixpkgs/issues/259488#issuecomment-1751768379 - # - https://github.com/NixOS/nixpkgs/pull/303494 - "mame": {"repo": "mame", "fetch_submodules": True}, - "mame2000": {"repo": "mame2000-libretro"}, - "mame2003": {"repo": "mame2003-libretro"}, - "mame2003-plus": {"repo": "mame2003-plus-libretro"}, - "mame2010": {"repo": "mame2010-libretro"}, - "mame2015": {"repo": "mame2015-libretro"}, - "mame2016": {"repo": "mame2016-libretro"}, - "melonds": {"repo": "melonds"}, - "mesen": {"repo": "mesen"}, - "mesen-s": {"repo": "mesen-s"}, - "meteor": {"repo": "meteor-libretro"}, - "mrboom": {"repo": "mrboom-libretro", "owner": "Javanaise", "fetch_submodules": True}, - "mgba": {"repo": "mgba"}, - "mupen64plus": {"repo": "mupen64plus-libretro-nx"}, - "neocd": {"repo": "neocd_libretro"}, - "nestopia": {"repo": "nestopia"}, - "nxengine": {"repo": "nxengine-libretro"}, - "np2kai": {"repo": "NP2kai", "owner": "AZO234", "fetch_submodules": True}, - "o2em": {"repo": "libretro-o2em"}, - "opera": {"repo": "opera-libretro"}, - "parallel-n64": {"repo": "parallel-n64"}, - # libretro/lrps2 is a hard-fork of pcsx2 with simplified code to target - # only libretro, while libretro/pcsx2 is supposedly closer to upstream but - # it is a WIP. - # TODO: switch to libretro/pcsx2 when upstream switches to it. - "pcsx2": {"repo": "lrps2"}, - "pcsx_rearmed": {"repo": "pcsx_rearmed"}, - "picodrive": {"repo": "picodrive", "fetch_submodules": True}, - "play": {"repo": "Play-", "owner": "jpd002", "fetch_submodules": True}, - "ppsspp": {"repo": "ppsspp", "owner": "hrydgard", "fetch_submodules": True}, - "prboom": {"repo": "libretro-prboom"}, - "prosystem": {"repo": "prosystem-libretro"}, - "puae": {"repo": "libretro-uae"}, - "quicknes": {"repo": "QuickNES_Core"}, - "sameboy": {"repo": "sameboy"}, - "same_cdi": {"repo": "same_cdi"}, - # This is the old source code before they upstreamed the source code, - # so now the libretro related code lives in the scummvm/scummvm repository. - # However this broke the old way we were doing builds, so for now point - # to a mirror with the old source code until this issue is fixed. - # TODO: switch to libretro/scummvm since this is more up-to-date - "scummvm": {"repo": "scummvm", "owner": "libretro-mirrors"}, - "smsplus-gx": {"repo": "smsplus-gx"}, - "snes9x": {"repo": "snes9x", "owner": "snes9xgit"}, - "snes9x2002": {"repo": "snes9x2002"}, - "snes9x2005": {"repo": "snes9x2005"}, - "snes9x2010": {"repo": "snes9x2010"}, - "stella": {"repo": "stella", "owner": "stella-emu"}, - "stella2014": {"repo": "stella2014-libretro"}, - "swanstation": {"repo": "swanstation"}, - "tgbdual": {"repo": "tgbdual-libretro"}, - "thepowdertoy": {"repo": "ThePowderToy"}, - "tic80": {"repo": "tic-80", "fetch_submodules": True}, - "vba-m": {"repo": "vbam-libretro"}, - "vba-next": {"repo": "vba-next"}, - "vecx": {"repo": "libretro-vecx"}, - "virtualjaguar": {"repo": "virtualjaguar-libretro"}, - "yabause": {"repo": "yabause"}, -} - - -def info(*msg): - print(*msg, file=sys.stderr) - - -def get_repo_hash_fetchFromGitHub( - repo, - owner="libretro", - deep_clone=False, - fetch_submodules=False, - leave_dot_git=False, - rev=None, -): - extra_args = [] - if deep_clone: - extra_args.append("--deep-clone") - else: - extra_args.append("--no-deep-clone") - if fetch_submodules: - extra_args.append("--fetch-submodules") - else: - extra_args.append("--no-fetch-submodules") - if leave_dot_git: - extra_args.append("--leave-dot-git") - else: - extra_args.append("--no-leave-dot-git") - if rev: - extra_args.append("--rev") - extra_args.append(rev) - try: - result = subprocess.run( - ["nix-prefetch-github", owner, repo, "--meta", *extra_args], - check=True, - capture_output=True, - text=True, - ) - except subprocess.CalledProcessError as ex: - info(f"Error while updating {owner}/{repo}:", ex.stderr) - raise ex - - j = json.loads(result.stdout) - return { - "fetcher": "fetchFromGitHub", - # Remove False values - "src": {k: v for k, v in j["src"].items() if v}, - "version": f"unstable-{j['meta']['commitDate']}", - } - - -def get_repo_hash(fetcher="fetchFromGitHub", **kwargs): - if fetcher == "fetchFromGitHub": - return get_repo_hash_fetchFromGitHub(**kwargs) - else: - raise ValueError(f"Unsupported fetcher: {fetcher}") - - -def get_repo_hashes(cores={}): - def get_repo_hash_from_core_def(core_def): - core, repo = core_def - info(f"Getting repo hash for '{core}'...") - result = core, get_repo_hash(**repo) - info(f"Got repo hash for '{core}'!") - return result - - with open(HASHES_PATH) as f: - repo_hashes = json.loads(f.read()) - - info(f"Running with {GET_REPO_THREADS} threads!") - with ThreadPoolExecutor(max_workers=GET_REPO_THREADS) as executor: - new_repo_hashes = executor.map(get_repo_hash_from_core_def, cores.items()) - - for core, repo in new_repo_hashes: - repo_hashes[core] = repo - - return repo_hashes - - -def main(): - # If you don't want to update all cores, pass the name of the cores you - # want to update on the command line. E.g.: - # $ ./update.py citra snes9x - if len(sys.argv) > 1: - cores_to_update = sys.argv[1:] - else: - cores_to_update = CORES.keys() - - cores = {core: repo for core, repo in CORES.items() if core in cores_to_update} - repo_hashes = get_repo_hashes(cores) - repo_hashes["!comment"] = "Generated with update_cores.py script, do not edit!" - info(f"Generating '{HASHES_PATH}'...") - with open(HASHES_PATH, "w") as f: - f.write(json.dumps(dict(sorted(repo_hashes.items())), indent=4)) - f.write("\n") - info("Finished!") - - -if __name__ == "__main__": - main() diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1624737d901d..69c562b3d52e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1480,12 +1480,7 @@ with pkgs; retroarch-joypad-autoconfig = callPackage ../applications/emulators/retroarch/retroarch-joypad-autoconfig.nix { }; - libretranslate = with python3.pkgs; toPythonApplication libretranslate; - - libretro = recurseIntoAttrs - (callPackage ../applications/emulators/retroarch/cores.nix { - retroarch = retroarchBare; - }); + libretro = recurseIntoAttrs (callPackage ../applications/emulators/retroarch/cores.nix { }); libretro-core-info = callPackage ../applications/emulators/retroarch/libretro-core-info.nix { }; @@ -10012,6 +10007,8 @@ with pkgs; python = python3; }; + libretranslate = with python3.pkgs; toPythonApplication libretranslate; + librsb = callPackage ../development/libraries/librsb { # Taken from https://build.opensuse.org/package/view_file/science/librsb/librsb.spec memHierarchy = "L3:16/64/8192K,L2:16/64/2048K,L1:8/64/16K";