anchor.diff:        };
   
         webapps = mkOption {
  -        default = [ pkgs.tomcat6 ];
  +        default = [ tomcat ];
           description = "List containing WAR files or directories with WAR files which are web applications to be deployed on Tomcat";
         };
   
  
positive.code: 	    # Change all references from CATALINA_HOME to CATALINA_BASE and add support for shared libraries
  	    sed -e 's|''${catalina.home}|''${catalina.base}|g' \
                  -e 's|shared.loader=|shared.loader=''${catalina.base}/shared/lib/*.jar|' \
  		${pkgs.tomcat6}/conf/catalina.properties > ${cfg.baseDir}/conf/catalina.properties
  
  	    # Create a modified server.xml which also includes all virtual hosts
  	    sed -e "/<Engine name=\"Catalina\" defaultHost=\"localhost\">/a\  ${
                           toString (map (virtualHost: ''<Host name=\"${virtualHost.name}\" appBase=\"virtualhosts/${virtualHost.name}/webapps\" unpackWARs=\"true\" autoDeploy=\"true\" xmlValidation=\"false\" xmlNamespaceAware=\"false\" >${if cfg.logPerVirtualHost then ''<Valve className=\"org.apache.catalina.valves.AccessLogValve\" directory=\"logs/${virtualHost.name}\"  prefix=\"${virtualHost.name}_access_log.\" pattern=\"combined\" resolveHosts=\"false\"/>'' else ""}</Host>'') cfg.virtualHosts)}" \
  	        ${pkgs.tomcat6}/conf/server.xml > ${cfg.baseDir}/conf/server.xml
  
  	    # Create a logs/ directory
  	    mkdir -p ${cfg.baseDir}/logs
  
negative.code: let
  
    cfg = config.services.tomcat;
    tomcat = pkgs.tomcat6;
  in
  
  {
  