nixpkgs/pkgs/applications/emulators/libretro/README.md

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

39 lines
840 B
Markdown
Raw Normal View History

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