Fixup mkCfg
Previously, dollar signs in the tf2 config str would be interpreted as bash variables during build
This commit is contained in:
@@ -14,15 +14,14 @@ let
|
|||||||
inherit hash name;
|
inherit hash name;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkCfg = name: body:
|
mkCfg = path: body:
|
||||||
pkgs.runCommand name {} ''
|
pkgs.runCommand path {} ''
|
||||||
${lib.toShellVar "name" name}
|
${lib.toShellVar "pathPart" path}
|
||||||
mkdir -p $out/cfg "$(dirname "$out/cfg/$name")"
|
path="$out/cfg/$pathPart.cfg"
|
||||||
tee "$out/cfg/$name.cfg" << SUPER_UNIQUE_EOF
|
mkdir -p "$(dirname -- "$path")"
|
||||||
// Generated by tf2.nix
|
echo "// Generated by tf2.nix" >> "$path"
|
||||||
|
echo >> "$path"
|
||||||
${body}
|
echo ${lib.escapeShellArg body} >> "$path"
|
||||||
SUPER_UNIQUE_EOF
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mergeTf2Configs = configs:
|
mergeTf2Configs = configs:
|
||||||
|
|||||||
Reference in New Issue
Block a user