<commit_before>{ stdenv, fetchgit, fetchFromGitHub, meson, ninja, pkgconfig
, dbus, glib, systemd }:

stdenv.mkDerivation rec {
  name = "dbus-broker-${version}";
  version = "3";

  src = fetchFromGitHub {
    owner           = "bus1";
    repo            = "dbus-broker";
    rev             = "v${version}";
    sha256          = "1f2vw5b2cbdgd3g7vnzwr9lsw9v4xc5nc0nf9xc3qb5xqzsq7v7i";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ meson ninja pkgconfig ];
  buildInputs = [ dbus glib systemd ];

  prePatch = ''
    substituteInPlace meson.build \
      --replace "dep_systemd.get_pkgconfig_variable('systemdsystemunitdir')" "'$out/lib/systemd/system'" \
      --replace "dep_systemd.get_pkgconfig_variable('systemduserunitdir')"   "'$out/lib/systemd/user'"
  '';

  preConfigure = ''
    mkdir build
    meson --prefix "$out" --buildtype=release build/
  '';

  buildPhase = "ninja -C build";

  installPhase = ''
    ninja -C build install
    install -Dm644 README $out/share/doc/dbus-broker/README
  '';

  checkPhase = "ninja -C build test";

  doCheck = true;

  meta = with stdenv.lib; {
    description = "Linux D-Bus Message Broker";
    homepage    = https://github.com/bus1/dbus-broker/wiki;
    license     = licenses.asl20;
    platforms   = platforms.linux;
    maintainers = with maintainers; [ peterhoeg ];
  };
}<commit_msg>dbus-broker: meson and ninja hooks handle most things for us<commit_after>{ stdenv, fetchgit, fetchFromGitHub, meson, ninja, pkgconfig
, dbus, glib, systemd }:

stdenv.mkDerivation rec {
  name = "dbus-broker-${version}";
  version = "3";

  src = fetchFromGitHub {
    owner           = "bus1";
    repo            = "dbus-broker";
    rev             = "v${version}";
    sha256          = "1f2vw5b2cbdgd3g7vnzwr9lsw9v4xc5nc0nf9xc3qb5xqzsq7v7i";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ meson ninja pkgconfig ];
  buildInputs = [ dbus glib systemd ];

  prePatch = ''
    substituteInPlace meson.build \
      --replace "dep_systemd.get_pkgconfig_variable('systemdsystemunitdir')" "'$out/lib/systemd/system'" \
      --replace "dep_systemd.get_pkgconfig_variable('systemduserunitdir')"   "'$out/lib/systemd/user'"
  '';

  postInstall = ''
    install -Dm644 ../README $out/share/doc/dbus-broker/README
  '';

  checkPhase = "ninja test";

  doCheck = true;

  meta = with stdenv.lib; {
    description = "Linux D-Bus Message Broker";
    homepage    = https://github.com/bus1/dbus-broker/wiki;
    license     = licenses.asl20;
    platforms   = platforms.linux;
    maintainers = with maintainers; [ peterhoeg ];
  };
}
{'fraction_non_alphanumeric': 0.1320754716981132, 'fraction_numerical': 0.020793222949557183, 'mean_word_length': 2.9483282674772036, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6952020', 'n_tokens_mistral': 978, 'n_tokens_neox': 937, 'n_words': 173}