<commit_before>{ stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, avahi
, gconf, gtk, intltool, gettext, alsaLib, libsamplerate, libsndfile, speex
, bluez, sbc, udev, libcap, json_c
, jackaudioSupport ? false, jackaudio ? null
, x11Support ? false, xlibs
, useSystemd ? false, systemd ? null }:

assert jackaudioSupport -> jackaudio != null;

stdenv.mkDerivation rec {
  name = "pulseaudio-4.0";

  src = fetchurl {
    url = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-4.0.tar.xz";
    sha256 = "1bndz4l8jxyq3zq128gzp3gryxl6yjs66j2y1d7yabw2n5mv7kim";
  };

  # Since `libpulse*.la' contain `-lgdbm' and `-lcap', it must be propagated.
  propagatedBuildInputs
    = [ gdbm ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap ];

  buildInputs =
    [ pkgconfig gnum4 libtool intltool glib dbus avahi libsamplerate libsndfile
      speex json_c ]
    ++ stdenv.lib.optional jackaudioSupport jackaudio
    ++ stdenv.lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ]
    ++ stdenv.lib.optional useSystemd systemd
    ++ stdenv.lib.optionals stdenv.isLinux [ alsaLib bluez sbc udev ];

  preConfigure = ''
    # Move the udev rules under $(prefix).
    sed -i "src/Makefile.in" \
        -e "s|udevrulesdir[[:blank:]]*=.*$|udevrulesdir = $out/lib/udev/rules.d|g"

   # don't install proximity-helper as root and setuid
   sed -i "src/Makefile.in" \
       -e "s|chown root|true |" \
       -e "s|chmod r+s |true |"
  '';

  configureFlags =
    [ "--disable-solaris" "--disable-jack" "--disable-oss-output"<commit_msg>pulseaudio: Update from 4.0 to 5.0<commit_after>{ stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, avahi
, gconf, gtk, intltool, gettext, alsaLib, libsamplerate, libsndfile, speex
, bluez, sbc, udev, libcap, json_c
, jackaudioSupport ? false, jackaudio ? null
, x11Support ? false, xlibs
, useSystemd ? false, systemd ? null }:

assert jackaudioSupport -> jackaudio != null;

stdenv.mkDerivation rec {
  name = "pulseaudio-5.0";

  src = fetchurl {
    url = "http://freedesktop.org/software/pulseaudio/releases/${name}.tar.xz";
    sha256 = "0fgrr8v7yfh0byhzdv4c87v9lkj8g7gpjm8r9xrbvpa92a5kmhcr";
  };

  # Since `libpulse*.la' contain `-lgdbm' and `-lcap', it must be propagated.
  propagatedBuildInputs
    = [ gdbm ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap ];

  buildInputs =
    [ pkgconfig gnum4 libtool intltool glib dbus avahi libsamplerate libsndfile
      speex json_c ]
    ++ stdenv.lib.optional jackaudioSupport jackaudio
    ++ stdenv.lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ]
    ++ stdenv.lib.optional useSystemd systemd
    ++ stdenv.lib.optionals stdenv.isLinux [ alsaLib bluez sbc udev ];

  preConfigure = ''
    # Move the udev rules under $(prefix).
    sed -i "src/Makefile.in" \
        -e "s|udevrulesdir[[:blank:]]*=.*$|udevrulesdir = $out/lib/udev/rules.d|g"

   # don't install proximity-helper as root and setuid
   sed -i "src/Makefile.in" \
       -e "s|chown root|true |" \
       -e "s|chmod r+s |true |"
  '';

  configureFlags =
    [ "--disable-solaris" "--disable-jack" "--disable-oss-output"
{'fraction_non_alphanumeric': 0.1337579617834395, 'fraction_numerical': 0.01910828025477707, 'mean_word_length': 3.5390173410404624, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3728574', 'n_tokens_mistral': 1277, 'n_tokens_neox': 1201, 'n_words': 256}