From 02decddeb1389d151ba3317bbaa47de624aab74c Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 13 Apr 2008 09:35:18 +0000 Subject: [PATCH] Added possibility to use names instead of full paths in httpd subservices. Yes, the same dirty hack again svn path=/nixos/trunk/; revision=11615 --- upstart-jobs/apache-httpd/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/upstart-jobs/apache-httpd/default.nix b/upstart-jobs/apache-httpd/default.nix index b3f3d0518e69..78a6d085f88b 100644 --- a/upstart-jobs/apache-httpd/default.nix +++ b/upstart-jobs/apache-httpd/default.nix @@ -45,8 +45,11 @@ let callSubservices = serverInfo: defs: let f = svc: - let config = addDefaultOptionValues res.options svc.config; - res = svc.function {inherit config pkgs serverInfo;}; + let + svcFunction = if svc ? function then + svc.function else (import ( ./noDir/.. + ("/" + svc.serviceName + ".nix"))); + config = addDefaultOptionValues res.options svc.config; + res = svcFunction {inherit config pkgs serverInfo;}; in res; in map f defs;