9d1e31117f
svn path=/nixos/branches/modular-nixos/; revision=16371
16 lines
365 B
Nix
16 lines
365 B
Nix
{runCommand}: job:
|
|
|
|
(
|
|
if job ? jobDrv then
|
|
job.jobDrv
|
|
else
|
|
(
|
|
runCommand ("upstart-" + job.name)
|
|
{ inherit (job) job;
|
|
jobName = job.name;
|
|
buildHook = if job ? buildHook then job.buildHook else "true";
|
|
}
|
|
"eval \"$buildHook\"; ensureDir $out/etc/event.d; echo \"$job\" > $out/etc/event.d/$jobName"
|
|
)
|
|
)
|