anchor.diff:      write_riemann = {
         buildInputs = [ protobufc riemann_c_client ];
       };
  -    write_sensu = {};
  -    write_tsdb = {};
  -    xencpu = {};
  -    xmms = {};
  -    zfs_arc = {};
  -    zone = {};
  -    zookeeper = {};
       xencpu = {
         buildInputs = [ xen ];
       };
     };
   
  -  configureFlags =
  -    if enabledPlugins == null
  -    then []
  -    else (map (plugin: "--enable-${plugin}") enabledPlugins) ++
  -    (map (plugin: "--disable-${plugin}")
  -      (builtins.filter (plugin: ! builtins.elem plugin enabledPlugins)
  -        (builtins.attrNames plugins))
  -    );
  +  configureFlags = lib.optionals (enabledPlugins != null) (
  +    [ "--disable-all-plugins" ]
  +    ++ (map (plugin: "--enable-${plugin}") enabledPlugins));
   
     pluginBuildInputs = plugin:
  -        if ! builtins.hasAttr plugin plugins
  -        then throw "Unknown collectd plugin: ${plugin}"
  -        else
  -          let
  -            pluginAttrs = builtins.getAttr plugin plugins;
  -          in
  -          if pluginAttrs ? "buildInputs"
  -          then pluginAttrs.buildInputs
  -          else [];
  +    lib.optionals (plugins ? ${plugin} && plugins.${plugin} ? buildInputs)
  +    plugins.${plugin}.buildInputs;
   
     buildInputs =
       if enabledPlugins == null
  
positive.code:     apache = {
        buildInputs = [ curl ];
      };
      apcups = {};
      apple_sensors = {};
      aquaero = {};
      ascent = {
        buildInputs = [ curl libxml2 ];
      };
      barometer = {};
      battery = {
        buildInputs = lib.optionals stdenv.isDarwin [
          darwin.apple_sdk.frameworks.IOKit
  
negative.code:     network = {
        buildInputs = [ libgcrypt ];
      };
      nginx = {
        buildInputs = [ curl ];
      };
      notify_desktop = {
        buildInputs = [ libnotify gdk-pixbuf ];
      };
      notify_email = {
        buildInputs = [ libesmtp ];
      };
  