mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
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
@ -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 New Issue
Block a user