forked from mirrors/nixpkgs
nixos/systemd: fix make unit failed when unit too large
This commit is contained in:
parent
998720bf94
commit
c1ae82f448
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue