retroarch-bare: use writeText instead of runCommand

This commit is contained in:
Stefan Frijters
2026-03-23 17:28:54 +01:00
parent cbcfde61a4
commit 321ebc05c0
2 changed files with 6 additions and 12 deletions
+2 -2
View File
@@ -44,7 +44,7 @@
retroarch-assets,
retroarch-bare,
retroarch-joypad-autoconfig,
runCommand,
writeText,
symlinkJoin,
# params
enableNvidiaCgToolkit ? false,
@@ -161,7 +161,7 @@ stdenv.mkDerivation (finalAttrs: {
libretro
makeBinaryWrapper
retroarch-bare
runCommand
writeText
symlinkJoin
cores
;
+4 -10
View File
@@ -3,22 +3,16 @@
libretro,
makeBinaryWrapper,
retroarch-bare,
runCommand,
writeText,
symlinkJoin,
cores ? [ ],
settings ? { },
}:
let
settingsPath =
runCommand "declarative-retroarch.cfg"
{
value = lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "${n} = \"${v}\"") settings);
__structuredAttrs = true;
}
''
printf "%s" "$value" > "$out"
'';
settingsPath = writeText "declarative-retroarch.cfg" (
lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "${n} = \"${v}\"") settings)
);
# All cores should be located in the same path after symlinkJoin,
# but let's be safe here