Unverified Commit 9fe9de97 authored by Will Fancher's avatar Will Fancher Committed by GitHub
Browse files

Merge pull request #264811 from emilylange/systemd-empty-unit-build

nixos/systemd-lib: fix building of empty unit files
parents 3919f9de 6c7ad5e7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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" ];
        }
        ''