Author: eelco
Date: Tue Sep 14 11:22:17 2010
New Revision: 23780
URL: https://svn.nixos.org/websvn/nix/?rev=23780&sc=1
Log:
* Add a job attribute (path) to allow adding packages to the job's
$PATH environment variable.
Modified:
nixos/trunk/modules/system/upstart/upstart.nix
Modified: nixos/trunk/modules/system/upstart/upstart.nix
==============================================================================
--- nixos/trunk/modules/system/upstart/upstart.nix Tue Sep 14 11:17:48
2010 (r23779)
+++ nixos/trunk/modules/system/upstart/upstart.nix Tue Sep 14 11:22:17
2010 (r23780)
@@ -39,7 +39,8 @@
${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 @@
'';
};
+ 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.
+ '';
+ };
+
};
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits