3
0
Fork 0
forked from mirrors/nixpkgs

Don't depend on the text of disabled units

This prevents pulling in unnecessary dependencies.
This commit is contained in:
Eelco Dolstra 2014-03-12 18:40:28 +01:00
parent 207c881df9
commit f198c40608

View file

@ -11,14 +11,18 @@ let
systemd = cfg.package;
makeUnit = name: unit:
pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; }
(if !unit.enable then ''
mkdir -p $out
ln -s /dev/null $out/${name}
'' else ''
mkdir -p $out
echo -n "$text" > $out/${name}
'');
if unit.enable then
pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; }
''
mkdir -p $out
echo -n "$text" > $out/${name}
''
else
pkgs.runCommand "unit" { preferLocalBuild = true; }
''
mkdir -p $out
ln -s /dev/null $out/${name}
'';
upstreamUnits =
[ # Targets.