3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/upstart-jobs/make-job.nix
Eelco Dolstra bf92844f16 * Allow Upstart jobs to declare additional /etc files.
svn path=/nixos/trunk/; revision=8505
2007-03-30 12:55:09 +00:00

16 lines
403 B
Nix

{runCommand}: job:
(
runCommand job.name {inherit (job) job;}
"ensureDir $out/etc/event.d; echo \"$job\" > $out/etc/event.d/$name"
)
//
# Allow jobs to declare extra packages that should be added to the
# system path, as well as extra files that should be added to /etc.
{
extraPath = if job ? extraPath then job.extraPath else [];
extraEtc = if job ? extraEtc then job.extraEtc else [];
}