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;
|
{ preferLocalBuild = true;
|
||||||
allowSubstitutes = false;
|
allowSubstitutes = false;
|
||||||
inherit (unit) text;
|
inherit (unit) text;
|
||||||
|
passAsFile = [ "text" ];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
name=${shellEscape name}
|
name=${shellEscape name}
|
||||||
mkdir -p "$out/$(dirname -- "$name")"
|
mkdir -p "$out/$(dirname -- "$name")"
|
||||||
echo -n "$text" > "$out/$name"
|
mv "$textPath" "$out/$name"
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
pkgs.runCommand "unit-${mkPathSafeName name}-disabled"
|
pkgs.runCommand "unit-${mkPathSafeName name}-disabled"
|
||||||
|
|
Loading…
Reference in a new issue