anchor.diff:      intltool
       libtool
       pkg-config
  -  ] ++ lib.optional gtk3Support wrapGAppsHook;
  +  ] ++ optionals gtk3Support [
  +    wrapGAppsHook
  +  ];
   
     enableParallelBuilding = true;
   
  
positive.code: 
  assert gtk2Support || gtk3Support;
  
  stdenv.mkDerivation rec {
    pname = "deadbeef";
    version = "1.8.4";
  
    src = fetchFromGitHub {
      owner = "DeaDBeeF-Player";
      repo = "deadbeef";
      rev = version;
      sha256 = "161b0ll8v4cjgwwmk137hzvh0jidlkx56vjkpnr70f0x4jzv2nll";
    };
  
    buildInputs = with lib; [ jansson ]
      ++ optional gtk2Support gtk2
      ++ optionals gtk3Support [ gtk3 gsettings-desktop-schemas ]
      ++ optional vorbisSupport libvorbis
      ++ optional mp123Support libmad
      ++ optional flacSupport flac
      ++ optional wavSupport libsndfile
      ++ optionals cdaSupport [ libcdio libcddb ]
      ++ optional aacSupport faad2
      ++ optional opusSupport opusfile
      ++ optional zipSupport libzip
      ++ optional ffmpegSupport ffmpeg
      ++ optional apeSupport yasm
      ++ optional artworkSupport imlib2
      ++ optional hotkeysSupport libX11
      ++ optional osdSupport dbus
      ++ optional alsaSupport alsa-lib
      ++ optional pulseSupport libpulseaudio
      ++ optional resamplerSupport libsamplerate
      ++ optional overloadSupport zlib
      ++ optional wavpackSupport wavpack
      ++ optional remoteSupport curl
      ;
  
    nativeBuildInputs = [
      autoconf
  
negative.code: , osdSupport ? true, dbus
  # output plugins
  , alsaSupport ? true, alsa-lib
  , pulseSupport ? config.pulseaudio or true, libpulseaudio
  # effect plugins
  , resamplerSupport ? true, libsamplerate
  , overloadSupport ? true, zlib
  