RetroArch: Difference between revisions

Jasi (talk | contribs)
Transition to modern style.
Line 1: Line 1:
RetroArch is a all-in-one front-end for emulators, game engines and media players. Nix allows for installing RetroArch cores in a declarative and customizable way.
== Installation ==
== Installation ==
[https://www.retroarch.com/ RetroArch] is available in nixpkgs via a few different packages,
[https://www.retroarch.com/ RetroArch] is available in nixpkgs via a few different packages,


* <code>retroarch-full</code>, contains all libretro cores
* <code>retroarch-full</code>, contains all libretro cores.
* <code>retroarch-free</code>, contains only cores available under a free-software license
* <code>retroarch-free</code>, excludes unfree cores.
* <code>retroarch.withCores</code>, a helper function for generating a retroarch package with a custom list of cores.
* <code>retroarch.withCores</code>, a helper function for generating a retroarch package with a custom list of cores.


=== Installing only certain 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; [
Using <code>retroarch.withCores</code>:
  (retroarch.override {
{{File|3={
    cores = with libretro; [
  environment.systemPackages = with pkgs; [
    (retroarch.withCores (cores: with cores; [
       genesis-plus-gx
       genesis-plus-gx
       snes9x
       snes9x
       beetle-psx-hw
       beetle-psx-hw
     ];
     ]))
   })
   ];
];
}|name=/etc/nixos/configuration.nix|lang=nix}}
</syntaxhighlight>
 
After NixOS 24.11, the RetroArch derivation was refactored, and the interface is now <code>retroarch.withCores</code>:<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [
  (retroarch.withCores (cores: with cores; [
    genesis-plus-gx
    snes9x
    beetle-psx-hw
  ]))
];
</syntaxhighlight>
 
The cores are defined here:


https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/emulators/libretro
One can browse the available cores [https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/emulators/libretro here]


== Gotchas ==
== Troubleshooting ==


=== Graphics ===
=== Graphics ===
Line 59: Line 49:
# After switching over to the new configuration and restarting Retroarch, you will see the mappings got updated.
# After switching over to the new configuration and restarting Retroarch, you will see the mappings got updated.
# Now you can create a pull request from your fork to the retroarch-joypad-autoconfig project to upstream your changes.
# Now you can create a pull request from your fork to the retroarch-joypad-autoconfig project to upstream your changes.
== Bugs ==


=== Input Reset ===
=== Input Reset ===
Line 69: Line 57:


No icons show in the GUI, including the mouse cursor. You need to go to <code>Online Updater > Update Assets</code> to download the icons. You can navigate the GUI with only the keyboard. Press enter to open sections/pages, backspace to go back out, arrow keys to choose between options (left/right change some values).
No icons show in the GUI, including the mouse cursor. You need to go to <code>Online Updater > Update Assets</code> to download the icons. You can navigate the GUI with only the keyboard. Press enter to open sections/pages, backspace to go back out, arrow keys to choose between options (left/right change some values).
== Error Messages ==


=== Error save controller profile ===
=== Error save controller profile ===