diff --git a/pkgs/wrap-retroarch.nix b/pkgs/wrap-retroarch.nix index 1abf718..296f46b 100644 --- a/pkgs/wrap-retroarch.nix +++ b/pkgs/wrap-retroarch.nix @@ -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} '';