anchor.diff:      lib.optionals stdenv.isLinux [ libcap ];
   
     buildInputs =
  -    [ libtool libsndfile soxr speexdsp fftwFloat check libintl ]
  +    [ libtool libsndfile soxr speexdsp fftwFloat check ]
       ++ lib.optionals stdenv.isLinux [ glib dbus ]
  -    ++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreServices ]
  +    ++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreServices libintl ]
       ++ lib.optionals (!libOnly) (
         [ libasyncns webrtc-audio-processing ]
         ++ lib.optional jackaudioSupport libjack2
  
positive.code:     "-Dsysconfdir=/etc"
      "-Dsysconfdir_install=${placeholder "out"}/etc"
      "-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d"
  
      # tests fail on Darwin because of timeouts
      "-Dtests=${if stdenv.isLinux then "true" else "false"}"
    ]
    ++ lib.optional (stdenv.isLinux && useSystemd) "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user";
  
    doCheck = true;
    preCheck = ''
      export HOME=$(mktemp -d)
    '';
  
negative.code:     "-Dbluez5-gstreamer=${if (!libOnly && bluetoothSupport && advancedBluetoothCodecs) then "enabled" else "disabled"}"
      "-Ddatabase=simple"
      "-Ddoxygen=false"
      "-Delogind=disabled"
      # gsettings does not support cross-compilation
      "-Dgsettings=${if stdenv.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
      "-Dgstreamer=disabled"
  