* Add a job attribute (path) to allow adding packages to the job's

$PATH environment variable.

svn path=/nixos/trunk/; revision=23780
This commit is contained in:
Eelco Dolstra 2010-09-14 11:22:17 +00:00
parent ea4d3e2c8c
commit 8a6fad83f4

View File

@ -39,7 +39,8 @@ let
${optionalString (job.stopOn != "") "stop on ${job.stopOn}"}
env PATH=${makeSearchPath "bin" upstartPath}:${makeSearchPath "sbin" upstartPath}
env PATH=${makeSearchPath "bin" (job.path ++ upstartPath)}:${makeSearchPath "sbin" (job.path ++ upstartPath)}
${concatMapStrings (n: "env ${n}=\"${getAttr n job.environment}\"\n") (attrNames job.environment)}
${optionalString (job.preStart != "") ''
@ -271,6 +272,15 @@ let
'';
};
path = mkOption {
default = [ ];
description = ''
Packages added to the job's <envar>PATH</envar> environment variable.
Both the <filename>bin</filename> and <filename>sbin</filename>
subdirectories of each package are added.
'';
};
};