1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/upstart-jobs/make-job.nix

16 lines
403 B
Nix
Raw Normal View History

{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 [];
}