anchor.diff:  
     systemServiceDirs = concatMapStrings
       (d: "<servicedir>${d}/share/dbus-1/system-services</servicedir> ")
  +    cfg.packages;
  +
  +  sessionServiceDirs = concatMapStrings
  +    (d: "<servicedir>${d}/share/dbus-1/services</servicedir> ")
       cfg.packages;
   
   in
  
positive.code:     buildCommand = ''
        ensureDir $out
        
        ln -s ${dbus}/etc/dbus-1/session.conf $out/session.conf
        
        cp ${dbus}/etc/dbus-1/system.conf $out/system.conf
  
        # Tell the daemon where the setuid wrapper around
        # dbus-daemon-launch-helper lives.      
        sed -i $out/system.conf \
            -e 's|<servicehelper>.*/libexec/dbus-daemon-launch-helper|<servicehelper>${config.security.wrapperDir}/dbus-daemon-launch-helper|'
  
        # Add the system-services directories to the daemon's search path.
        sed -i $out/system.conf \
            -e 's|<standard_system_servicedirs/>|${systemServiceDirs}|'
            
        # Note: system.conf includes ./system.d (i.e. it has a relative,
        # not absolute path).
        ensureDir $out/session.d
        ensureDir $out/system.d
        
        for i in ${toString cfg.packages}; do
          for j in $i/etc/dbus-1/session.d/*; do
            ln -s $j  $out/session.d/
          done
          for j in $i/etc/dbus-1/system.d/*; do
            ln -s $j $out/system.d/
  
negative.code: # D-Bus configuration and system bus daemon.
  
  { config, pkgs, ... }:
  
  with pkgs.lib;
  
  