mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
.. | ||
patches | ||
cores.nix | ||
default.nix | ||
hashes.json | ||
kodi-advanced-launchers.nix | ||
libretro-core-info.nix | ||
mkLibretroCore.nix | ||
README.md | ||
retroarch-assets.nix | ||
retroarch-joypad-autoconfig.nix | ||
update_cores.py | ||
wrapper.nix |
RetroArch
This directory includes RetroArch, libretro cores and related packages.
Adding new cores
The basic steps to add a new core are:
- Add the core repository to update_cores.py inside the
CORES
map.- The minimum required parameter is
repo
- If the repository owner is not
libretro
, setowner
parameter - If the core needs submodules, set
fetch_submodules
parameter toTrue
- To pin the core to a specific release, set
rev
parameter
- The minimum required parameter is
- Run
./pkgs/applications/emulators/retroarch/update_cores.py <emulator>
to generatehashes.json
file - Add your new core to
cores.nix
file, usingmkLibretroCore
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 for the core you're trying to add for instructions on how to build
- Also check the examples inside
cores.nix
- If your core is recently released, there is a good chance that you may
need to update
libretro-core-info
for things to work inside RetroArch
- Try to build your core with
nix-build -A libretro.<core>
Updating cores
Just run:
# 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
(PAT), otherwise the update will probably fail due to GitHub's API rate limit.
Using RetroArch with cores
To create a custom RetroArch derivation with the cores you want (instead of
using retroarchFull
that includes all cores), you can use .override
like
this:
{ pkgs, ... }:
let
retroarchWithCores = (pkgs.retroarch.override {
cores = with pkgs.libretro; [
bsnes
mgba
quicknes
];
});
in
{
environment.systemPackages = [
retroarchWithCores
];
}