Merge pull request #264811 from emilylange/systemd-empty-unit-build
nixos/systemd-lib: fix building of empty unit files
This commit is contained in:
commit
9fe9de9762
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,10 @@ in rec {
|
|||
pkgs.runCommand "unit-${mkPathSafeName name}"
|
||||
{ preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
inherit (unit) text;
|
||||
# unit.text can be null. But variables that are null listed in
|
||||
# passAsFile are ignored by nix, resulting in no file being created,
|
||||
# making the mv operation fail.
|
||||
text = optionalString (unit.text != null) unit.text;
|
||||
passAsFile = [ "text" ];
|
||||
}
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue