libretro: update README.md
This commit is contained in:
parent
d8c5c5e001
commit
967dae48b2
@ -1,46 +1,16 @@
|
|||||||
# RetroArch
|
# Libretro
|
||||||
|
|
||||||
This directory includes [RetroArch](https://www.retroarch.com/), [libretro
|
[libretro cores](https://docs.libretro.com/guides/core-list/) and related
|
||||||
cores](https://docs.libretro.com/guides/core-list/) and related packages.
|
packages.
|
||||||
|
|
||||||
## Adding new cores
|
## Adding new cores
|
||||||
|
|
||||||
The basic steps to add a new core are:
|
The basic steps to add a new core are:
|
||||||
|
|
||||||
1. Add the core repository to [update_cores.py](./update_cores.py) inside the
|
1. Add a new core using `mkLibretroCore` function (use one of the existing
|
||||||
`CORES` map.
|
files as an example)
|
||||||
- The minimum required parameter is `repo`
|
2. Add your new core to [`default.nix`](./default.nix) file
|
||||||
- If the repository owner is not `libretro`, set `owner` parameter
|
3. Try to build your core with `nix-build -A libretro.<core>`
|
||||||
- If the core needs submodules, set `fetch_submodules` parameter to `True`
|
|
||||||
- To pin the core to a specific release, set `rev` parameter
|
|
||||||
2. Run `./pkgs/applications/emulators/retroarch/update_cores.py <emulator>` to
|
|
||||||
generate [`hashes.json`](./hashes.json) file
|
|
||||||
3. Add your new core to [`cores.nix`](./cores.nix) file, using
|
|
||||||
[`mkLibretroCore`](./mkLibretroCore.nix) 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](https://docs.libretro.com/) for the core you're trying to add
|
|
||||||
for instructions on how to build
|
|
||||||
- Also check the examples inside [`cores.nix`](./cores.nix)
|
|
||||||
- If your core is recently released, there is a good chance that you may
|
|
||||||
need to update [`libretro-core-info`](./libretro-core-info.nix) for things
|
|
||||||
to work inside RetroArch
|
|
||||||
4. Try to build your core with `nix-build -A libretro.<core>`
|
|
||||||
|
|
||||||
## Updating cores
|
|
||||||
|
|
||||||
Just run:
|
|
||||||
|
|
||||||
```console
|
|
||||||
# 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](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
|
|
||||||
(PAT), otherwise the update will probably fail due to GitHub's API rate limit.
|
|
||||||
|
|
||||||
## Using RetroArch with cores
|
## Using RetroArch with cores
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user