retroarch-bare: use writeText instead of runCommand
This commit is contained in:
@@ -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
|
||||
;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user