<commit_before>{stdenv, dbus, dbusServices ? []}:

let

  homeDir = "/var/run/dbus";

  # Take the standard system configuration file, except that we don't
  # want to fork (Upstart will monitor the daemon).
  configFile = stdenv.mkDerivation {
    name = "dbus-conf";
    buildCommand = "
      ensureDir $out
      substitute ${dbus}/etc/dbus-1/system.conf $out/system.conf \\
        --replace '<fork/>' ''

      ensureDir $out/system.d
      for i in ${toString dbusServices}; do
        ln -s $i/etc/dbus-1/system.d/* $out/system.d/
      done
    ";
  };

in

{
  name = "dbus";
  
  users = [
    { name = "messagebus";
      uid = (import ../system/ids.nix).uids.messagebus;
      description = "D-Bus system message bus daemon user";
      home = homeDir;
    }
  ];
  
  extraPath = [dbus];
  
  job = "
description \"D-Bus system message bus daemon\"

start on startup
stop on shutdown

start script

    mkdir -m 0755 -p ${homeDir}
    chown messagebus ${homeDir}

    mkdir -m 0755 -p /var/lib/dbus
    ${dbus}/bin/dbus-uuidgen --ensure

end script

respawn

script
    rm -f ${homeDir}/pid
    exec ${dbus}/bin/dbus-daemon --config-file=${configFile}/system.conf
end script
  ";
  
}<commit_msg>* dbus-uuidgen is now in dbus.tools.  Also, a quick hack to get    DBus clients working again: they expect dbus-launch in the    dbus.daemon prefix, where it no longer is.  Fortunately they   also search in the path.  But a better fix is to move dbus-launch   to dbus.daemon.<commit_after>{stdenv, dbus, dbusServices ? []}:

let

  homeDir = "/var/run/dbus";

  # Take the standard system configuration file, except that we don't
  # want to fork (Upstart will monitor the daemon).
  configFile = stdenv.mkDerivation {
    name = "dbus-conf";
    buildCommand = "
      ensureDir $out
      substitute ${dbus}/etc/dbus-1/system.conf $out/system.conf \\
        --replace '<fork/>' ''

      ensureDir $out/system.d
      for i in ${toString dbusServices}; do
        ln -s $i/etc/dbus-1/system.d/* $out/system.d/
      done
    ";
  };

in

{
  name = "dbus";
  
  users = [
    { name = "messagebus";
      uid = (import ../system/ids.nix).uids.messagebus;
      description = "D-Bus system message bus daemon user";
      home = homeDir;
    }
  ];
  
  extraPath = [dbus.daemon dbus.tools];
  
  job = "
description \"D-Bus system message bus daemon\"

start on startup
stop on shutdown

start script

    mkdir -m 0755 -p ${homeDir}
    chown messagebus ${homeDir}

    mkdir -m 0755 -p /var/lib/dbus
    ${dbus.tools}/bin/dbus-uuidgen --ensure

end script

respawn

script
    rm -f ${homeDir}/pid
    exec ${dbus}/bin/dbus-daemon --config-file=${configFile}/system.conf
end script
  ";
  
}
{'fraction_non_alphanumeric': 0.1319290465631929, 'fraction_numerical': 0.007390983000739098, 'mean_word_length': 2.435279187817259, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3180694', 'n_tokens_mistral': 975, 'n_tokens_neox': 933, 'n_words': 267}