nixpkgs/upstart-jobs/gather.nix
Marc Weber cb411d1a3d Synced with trunk @ 15580
svn path=/nixos/branches/modular-nixos/; revision=15645
2009-05-18 12:59:01 +00:00

18 lines
407 B
Nix

# Create an etc/event.d directory containing symlinks to the
# specified list of Upstart job files.
{runCommand, jobs}:
runCommand "upstart-jobs" {inherit jobs;}
"
ensureDir $out/etc/event.d
for i in $jobs; do
if ln -s $i . ; then
if test -d $i; then
ln -s $i/etc/event.d/* $out/etc/event.d/
fi
else
echo Duplicate entry: $i;
fi;
done
"