Fixup mkCfg

Previously, dollar signs in the tf2 config str would be interpreted as bash variables during build
This commit is contained in:
Shelvacu
2025-06-29 18:19:52 -07:00
committed by Shelvacu on fw
parent 36fb39c38b
commit affcea3dd9

View File

@@ -14,15 +14,14 @@ let
inherit hash name;
};
mkCfg = name: body:
pkgs.runCommand name {} ''
${lib.toShellVar "name" name}
mkdir -p $out/cfg "$(dirname "$out/cfg/$name")"
tee "$out/cfg/$name.cfg" << SUPER_UNIQUE_EOF
// Generated by tf2.nix
${body}
SUPER_UNIQUE_EOF
mkCfg = path: body:
pkgs.runCommand path {} ''
${lib.toShellVar "pathPart" path}
path="$out/cfg/$pathPart.cfg"
mkdir -p "$(dirname -- "$path")"
echo "// Generated by tf2.nix" >> "$path"
echo >> "$path"
echo ${lib.escapeShellArg body} >> "$path"
'';
mergeTf2Configs = configs: