mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 00:33:10 +00:00
retroarch: add withCores helper
This commit is contained in:
parent
3c11d3ede1
commit
3aa0725cb3
@ -37,6 +37,7 @@
|
||||
wayland-scanner,
|
||||
zlib,
|
||||
# wrapper deps
|
||||
libretro,
|
||||
libretro-core-info,
|
||||
retroarch-assets,
|
||||
retroarch-bare,
|
||||
@ -153,6 +154,7 @@ stdenv.mkDerivation rec {
|
||||
import ./wrapper.nix {
|
||||
inherit
|
||||
lib
|
||||
libretro
|
||||
makeWrapper
|
||||
retroarch-bare
|
||||
runCommand
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
libretro,
|
||||
makeWrapper,
|
||||
retroarch-bare,
|
||||
runCommand,
|
||||
@ -45,6 +46,7 @@ symlinkJoin {
|
||||
passthru = {
|
||||
inherit cores;
|
||||
unwrapped = retroarch-bare;
|
||||
withCores = coreFun: retroarch-bare.wrapper { cores = (coreFun libretro); };
|
||||
};
|
||||
|
||||
postBuild = ''
|
||||
|
@ -1454,19 +1454,19 @@ with pkgs;
|
||||
|
||||
### APPLICATIONS/EMULATORS/RETROARCH
|
||||
|
||||
retroarch-full = wrapRetroArch {
|
||||
cores = builtins.filter
|
||||
# Remove cores not supported on platform
|
||||
(c: c ? libretroCore && (lib.meta.availableOn stdenv.hostPlatform c))
|
||||
(builtins.attrValues libretro);
|
||||
};
|
||||
libretro = recurseIntoAttrs (callPackage ../applications/emulators/retroarch/cores.nix { });
|
||||
|
||||
retroarch = retroarch-bare.wrapper { };
|
||||
|
||||
retroarch-full = retroarch.withCores (
|
||||
cores:
|
||||
builtins.filter
|
||||
(c: (c ? libretroCore) && (lib.meta.availableOn stdenv.hostPlatform c))
|
||||
(builtins.attrValues cores)
|
||||
);
|
||||
|
||||
wrapRetroArch = retroarch-bare.wrapper;
|
||||
|
||||
retroarch = retroarch-bare.wrapper;
|
||||
|
||||
libretro = recurseIntoAttrs (callPackage ../applications/emulators/retroarch/cores.nix { });
|
||||
|
||||
# Aliases kept here because they are easier to use
|
||||
x16-emulator = x16.emulator;
|
||||
x16-rom = x16.rom;
|
||||
|
Loading…
Reference in New Issue
Block a user