3
0
Fork 0
forked from mirrors/nixpkgs

nixos/systemd: fix make unit failed when unit too large

This commit is contained in:
5aaee9 2023-10-26 18:34:19 +08:00
parent 998720bf94
commit c1ae82f448

View file

@ -21,11 +21,12 @@ in rec {
{ preferLocalBuild = true;
allowSubstitutes = false;
inherit (unit) text;
passAsFile = [ "text" ];
}
''
name=${shellEscape name}
mkdir -p "$out/$(dirname -- "$name")"
echo -n "$text" > "$out/$name"
mv "$textPath" "$out/$name"
''
else
pkgs.runCommand "unit-${mkPathSafeName name}-disabled"