How to install (and set up?) Retroarch


#1

I’m trying to install Retroarch, but the description of the package is not helpful and I could not find any documentation about it either on the https://nixos.wiki nor anywhere else online.

e.g. nix search retroarch shows:

warning: using cached results; pass '-u' to update the cache
Attribute name: nixpkgs.retroarch
Package name: retroarch
Version: 1.7.1
Description: Multi-platform emulator frontend for libretro cores (with cores: )

Attribute name: nixpkgs.retroarchBare
Package name: retroarch-bare
Version: 1.7.1
Description: Multi-platform emulator frontend for libretro cores

So what is one to put into configuration.nix?

From the scarce info that is presented, I would assume that:

either a) simply

retroarch

would give me the whole package with all the (default?) cores.

or b)

retroarch (with: [mame, nestopia, prboom])

which I have a feeling is wrong.

If someone gives me push in the right direction, I’m happy to document at least the basic instructions here and/or the wiki.


#2

It depends on what your intention is.
If you want retroarch to be on the path, this should do it:

{ config, pkgs, ... }:
{
...
  environment.systemPackages = with pkgs; [
	...
	retroarch
  ];
...
}


#3

That far I understand.

But if you look at the package list, you will see there are two possibilities:

  • retroarch – “Multi-platform emulator frontend for libretro cores (with cores: )”
  • retroarch-bare – “Multi-platform emulator frontend for libretro cores”

https://nixos.org/nixos/packages.html#retroarch

Now, if I want to have certain cores (i.e. an actually useful RetroArch), how do I get about that?


#4

I think setting

nixpkgs.config.retroarch = {
  enableDolphin = true;
  enableMGBA = true;
  enableMAME = true;
};

etc. should work. You can find possible options in the nixpkgs repo in the pkgs/top-level/all-packages.nix file when you search for retroarch.

Last time I tried it I think I needed to download the cores in retroarch again, but I think they didn’t all work when I didn’t enable them via the options above. I guess you have to experiment a bit what works and what doesn’t. :confused:


#5

Thanks, that seems to have done it (apart from MAME being broken).

I still needed to download cores from the UI and the UI seems to be missing icons. And downloading a core through the UI, that was not enabled in configuration.nix still worked.

So this seems to be that the difference between retroarch and retroarch-bare is either very odd or broken.

What is the best way to document how one should handle a package like this?

  • a new wiki page?
  • change description of the package?

Since all these options seem to have to be described in the pkgs/top-level/all-packages.nix, wouldn’t it make sense to have documentation on what options are available auto-generated?

… similar to what packages.gentoo.org do – see e.g.:

https://packages.gentoo.org/packages/media-sound/xwax


#6

I personally think it would be helpful if the package options would be documented like NixOS options and searchable via https://nixos.org/nixos/options.html or a similar site. I’m nor sure though what the correct way to approach that would be, as afaik e.g. NixOS options come with a significant performance penalty for all users when evaluating the package set.

I hope a ‘veteran’ can weigh in here. :stuck_out_tongue:


#7

The discussion starting at https://botbot.me/freenode/nixos/msg/105287014/ and https://github.com/NixOS/nixpkgs/issues/26211 (linked from there) might interest you. :slight_smile: