fix retroarch wrapping

This commit is contained in:
sinavir 2024-01-17 13:33:06 +01:00
parent c6e27fd9d2
commit 33970a47dc

View file

@ -12,7 +12,7 @@ let
settings' = { libretro_directory = coresPath; } // settings;
settingsPath = runCommand "declarative-retroarch.cfg"
{
value = lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "${n} = \"${v}\"") settings);
value = lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "${n} = \"${v}\"") settings');
passAsFile = [ "value" ];
}
''
@ -20,8 +20,8 @@ let
'';
coresPath = let
path = assert
lib.assertMsg (builtins.length (map (c: c.libretroCore) cores) == 1)
"Libretro cores are not under the same paths";
lib.assertMsg (builtins.length (lib.unique (map (c: c.libretroCore) cores)) == 1)
"Libretro cores are not under the same paths: ${builtins.toString (lib.unique (builtins.map (c: c.libretroCore) cores))}";
(builtins.head cores).libretroCore;
in
symlinkJoin {
@ -43,7 +43,6 @@ symlinkJoin {
};
postBuild = ''
# wrap binary to load cores from the proper location(s)
wrapProgram $out/bin/retroarch ${wrapperArgs}
'';