anchor.diff:  
     postInstall = optionalString libOnly ''
       rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}}
  -    sed -i $out/lib/pulseaudio/libpulsecore-${version}.la \
  -      -e 's|-lltdl|-L${libtool}/lib -lltdl|'
     '';
   
     meta = with stdenv.lib; {
  
positive.code:     '';
  
    configureFlags = [
      (otFlag "localstatedir" true "/var")
      (otFlag "sysconfdir" true "/etc")
      (enFlag "atomic-arm-memory-barrier" false null)
      (enFlag "neon-opt" false null)
      (enFlag "x11" hasXlibs null)
      (wtFlag "caps" hasCaps optLibcap)
      (enFlag "tests" true null)
      "--disable-samplerate" # Deprecated
      (wtFlag "database" true databaseName)
      (enFlag "oss-output" hasOss null)
      (enFlag "oss-wrapper" true null) # Does not use OSS
      (enFlag "coreaudio-output" (optCoreaudio != null) null)
      (enFlag "alsa" (optAlsaLib != null) null)
      (enFlag "esound" (optEsound != null) null)
      (enFlag "solaris" false null)
      (enFlag "waveout" false null) # Windows Only
      (enFlag "glib2" (optGlib != null) null)
      (enFlag "gtk3" (optGtk3 != null) null)
      (enFlag "gconf" (optGconf != null) null)
      (enFlag "avahi" (optAvahi != null) null)
      (enFlag "jack" (optLibjack2 != null) null)
      (enFlag "asyncns" (optLibasyncns != null) null)
      (enFlag "tcpwrap" false null)
      (enFlag "lirc" (optLirc != null) null)
      (enFlag "dbus" (optDbus != null) null)
      (enFlag "bluez4" false null)
      (enFlag "bluez5" (optBluez != null) null)
      (enFlag "bluez5-ofono-headset" (optBluez != null) null)
      (enFlag "bluez5-native-headset" (optBluez != null) null)
      (enFlag "udev" (optUdev != null) null)
      (enFlag "hal-compat" false null)
      (enFlag "ipv6" true null)
      (enFlag "openssl" (optOpenssl != null) null)
      (wtFlag "fftw" (optFftw != null) null)
      (wtFlag "speex" (optSpeexdsp != null) null)
      (wtFlag "soxr" (optSoxr != null) null)
      (enFlag "xen" false null)
      (enFlag "gcov" false null)
      (enFlag "systemd-daemon" (optSystemd != null) null)
      (enFlag "systemd-login" (optSystemd != null) null)
      (enFlag "systemd-journal" (optSystemd != null) null)
      (enFlag "manpages" true null)
      (enFlag "webrtc-aec" hasWebrtc null)
      (enFlag "adrian-aec" true null)
      (wtFlag "system-user" true "pulse")
      (wtFlag "system-group" true "pulse")
      (wtFlag "access-group" true "audio")
      (wtFlag "systemduserunitdir" true "\${out}/lib/systemd/user")
      (wtFlag "bash-completion-dir" true
        "\${out}/share/bash-completions/completions")
    ];
  
    installFlags = [
  
negative.code:     libtool
    ];
  
    buildInputs = [
      glib
      libasyncns
      libcap
      json-c
      libsndfile
      fftw_double
      tdb
      speexdsp
    ] ++ optionals (!libOnly) [
      dbus_lib
      alsa-lib
      gtk3
      gconf
      avahi
      jack2_lib
      lirc
      openssl
      soxr
      systemd_lib
      webrtc-audio-processing
      xorg.libX11
      xorg.libxcb
      xorg.libICE
      xorg.libSM
      xorg.libXtst
      xorg.xextproto
      xorg.libXi
      bluez
      sbc
    ];
  
    patches = [
  