RetroArch: Difference between revisions

Ibizaman (talk | contribs)
Add more info about mappings.
Update installation section
Line 1: Line 1:
You can install retroarch with some cores (actual emulators) by putting something like this in your <code>/etc/nixos/configuration.nix</code>:
== Installation ==
[https://www.retroarch.com/ RetroArch] is available in nixpkgs via a few different packages,


<syntaxhighlight lang="nix">
* <code>retroarch-full</code>, contains all libretro cores
* <code>retroarch-free</code>, contains only cores available under a free-software license
* <code>retroarch.withCores</code>, a helper function for generating a retroarch package with a custom list of cores.
 
=== Installing only certain cores ===
In NixOS 24.11, you override the retroarch derivation to pass a list of custom cores like below.<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [
   (retroarch.override {
   (retroarch.override {
Line 13: Line 19:
</syntaxhighlight>
</syntaxhighlight>


The cores are defined here:
After NixOS 24.11, the RetroArch derivation was refactored, and the interface is now <code>retroarch.withCores</code>. See the libretro README in nixpkgs for example usage.
 
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/emulators/retroarch/cores.nix#L61


== Gotchas ==
== Gotchas ==