The issue of non-working cores on newer versions of RetroArch was caused
by the missing core metadata that is available on
libretro/libretro-super repo. This also allows RetroArch to works
properly, for example there is no need to load a core before loading a
content: RetroArch knows each emulator to load depending on the
available emulators and the file extension.
To load the metadata from `/nix/store`, we need to patch the
`retroarch.cfg`. Sadly this file is only updated when needed, for
example, it will update if the path that it is pointing doesn't exist
anymore. However, before this PR it pointed to a file located in the
HOME directory, so if someone used RetroArch before they will probably
have issues while loading the file.
I tried to patch the configuration loader directly but the code is kinda
messy and this seems very prone to breakage (while the `retroarch.cfg`
file seems an stable interface). One better solution will probably be
the introduction of a module that can generate `retroarch.cfg` file
(since retroarch supports loading a config from `/etc/retroarch.cfg`).
But this will come in a future PR.
Without the fix build on ncurses-6.3 fails as:
src/include/souffle/provenance/Explain.h:522:18: error: format not a string literal and no format arguments [-Werror=format-security]
522 | mvwprintw(queryWindow, 1, 0, prompt.c_str());
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Currently compile fails on Darwin on command
running "perl" "./Configure" "--prefix=/private/tmp/nix-build-wezterm-20210814-124438-54e29167.drv-0/source/target/aarch64-apple-darwin/release/build/openssl-sys-90b3c73e9c998931/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "darwin64-arm64-cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC"
with
`Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }'
This commit fixes this issue.