mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
systemd: include name of the unit when generating nix store path
This commit is contained in:
parent
36b981933f
commit
0854836fd2
1 changed files with 2 additions and 2 deletions
|
@ -12,13 +12,13 @@ let
|
|||
|
||||
makeUnit = name: unit:
|
||||
if unit.enable then
|
||||
pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; }
|
||||
pkgs.runCommand "unit-${name}" { preferLocalBuild = true; inherit (unit) text; }
|
||||
''
|
||||
mkdir -p $out
|
||||
echo -n "$text" > $out/${shellEscape name}
|
||||
''
|
||||
else
|
||||
pkgs.runCommand "unit" { preferLocalBuild = true; }
|
||||
pkgs.runCommand "unit-${name}-disabled" { preferLocalBuild = true; }
|
||||
''
|
||||
mkdir -p $out
|
||||
ln -s /dev/null $out/${shellEscape name}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue