<commit_before>{ stdenv, fetchurl, coreutils , unzip, which, pkgconfig , dbus
, freetype, xdg_utils , libXext, glib, pango , cairo, libX11, libnotify
, libxdg_basedir , libXScrnSaver, xproto, libXinerama , perl, gdk_pixbuf
}:

stdenv.mkDerivation rec {
  version = "1.0.0";
  name = "dunst-${version}";

  src = fetchurl {
    url = "https://github.com/knopwob/dunst/archive/v${version}.zip";
    sha256 = "1x6k6jrf219v8hmhqhnnfjycldvsnp7ag8a2y8adp5rhfmgyn671";
  };

  patchPhase = ''
    substituteInPlace "settings.c" \
      --replace "xdgConfigOpen(\"dunst/dunstrc\", \"r\", &xdg" "fopen(\"$out/share/dunst/dunstrc\", \"r\""
  '';

  buildInputs =
  [ coreutils unzip which pkgconfig dbus freetype libnotify gdk_pixbuf
    xdg_utils libXext glib pango cairo libX11 libxdg_basedir
    libXScrnSaver xproto libXinerama perl];

  buildPhase = ''
    export VERSION=${version};
    export PREFIX=$out;
    make dunst;
  '';

  meta = {
    description = "lightweight and customizable notification daemon";
    homepage = http://www.knopwob.org/dunst/;
    license = stdenv.lib.licenses.bsd3;
    # NOTE: 'unix' or even 'all' COULD work too, I'm not sure
    platforms = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.iElectric ];
  };
}<commit_msg>dunst: upgrade to git version to fix 100% CPU problems<commit_after>{ stdenv, fetchgit, coreutils , unzip, which, pkgconfig , dbus
, freetype, xdg_utils , libXext, glib, pango , cairo, libX11, libnotify
, libxdg_basedir , libXScrnSaver, xproto, libXinerama , perl, gdk_pixbuf
}:

stdenv.mkDerivation rec {
  rev = "6a3a855b48a3db64821d1cf8a91c5ee2815a2b2d";
  name = "dunst-${rev}";

  # 1.0.0 release doesn't include 100% CPU fix
  # https://github.com/knopwob/dunst/issues/98
  src = fetchgit {
    inherit rev;
    url = "https://github.com/knopwob/dunst.git";
    sha256 = "0m7yki16d72xm9n2m2fjszd8phqpn5b95q894cz75pmd0sv1j6bj";
  };

  patchPhase = ''
    substituteInPlace "settings.c" \
      --replace "xdgConfigOpen(\"dunst/dunstrc\", \"r\", &xdg" "fopen(\"$out/share/dunst/dunstrc\", \"r\""
  '';

  buildInputs =
  [ coreutils unzip which pkgconfig dbus freetype libnotify gdk_pixbuf
    xdg_utils libXext glib pango cairo libX11 libxdg_basedir
    libXScrnSaver xproto libXinerama perl];

  buildPhase = ''
    export VERSION=${rev};
    export PREFIX=$out;
    make dunst;
  '';

  meta = {
    description = "lightweight and customizable notification daemon";
    homepage = http://www.knopwob.org/dunst/;
    license = stdenv.lib.licenses.bsd3;
    # NOTE: 'unix' or even 'all' COULD work too, I'm not sure
    platforms = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.iElectric ];
  };
}
{'fraction_non_alphanumeric': 0.13032210292484264, 'fraction_numerical': 0.03332099222510181, 'mean_word_length': 3.732049036777583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, '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': '2387847', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1072, 'n_words': 211}