anchor.diff:  , webrtc-audio-processing
   , xorg
   
  -# Extra options
   , prefix ? ""
   
  -# Patch sources
   # Set latency_msec in module-loopback (Default: 200)
   , loopbackLatencyMsec ? "200"
   # Set default resampler (Default: speex-float-1)
   # See `resample-method` in manpage for pulse-daemon.conf, resample-methods.nix
   # or run `pulseaudio --dump-resample-methods` for possible values.
  +# NOTE: Only speex resample methods supports dynamic sample rates used by
  +#       some applications such as mumble.
   , resampleMethod ? "speex-float-1"
   }:
   
  
positive.code:     "--enable-systemd-journal"
    ];
  
    installFlags = [
      "sysconfdir=$(out)/etc"
      "pulseconfdir=$(out)/etc/pulse"
    ];
  
    postInstall = optionalString libOnly ''
      rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}}
    '';
  
    meta = with stdenv.lib; {
  
negative.code:   postPatch =
      optionalString (loopbackLatencyMsec != "200")
      /* Allow patching default latency_msec */ ''
        sed -i src/modules/module-loopback.c \
          -e 's/DEFAULT_LATENCY_MSEC 200/DEFAULT_LATENCY_MSEC ${loopbackLatencyMsec}/'  
      '' + optionalString (resampleMethod != "speex-float-1")
      /* Allow patching default resampler */ ''
        sed -i src/pulsecore/resampler.c \
          -e 's/unique_jhsdjhsdf_string/${resampleMethodString}/'
      '';
  
    preConfigure =
      /* Performs an autoreconf */ ''
        export NOCONFIGURE="yes"
        patchShebangs bootstrap.sh
        ./bootstrap.sh
      '' + /* 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 |"
      '' + ''
        configureFlagsArray+=(
          "--with-systemduserunitdir=$out/lib/systemd/user"
          "--with-bash-completion-dir=$out/share/bash-completions/completions"
        )
      '';
  
    configureFlags = [
  