anchor.diff:      "-I${libopus.dev}/include/opus"
       "-I${alsaLib.dev}/include/alsa"
       "-I${libpulseaudio.dev}/include/pulse"
  -  ]) [ "QtCore" "QtGui" ];
  +  ]) [ "QtCore" "QtGui" "QtDBus" ];
     CPPFLAGS = NIX_CFLAGS_COMPILE;
   
     preConfigure = ''
  
positive.code:       -e 's,-flto,,g'
  
      sed -i Telegram/gyp/qt.gypi \
        -e "s,/usr/bin/moc,moc,g"
      sed -i Telegram/gyp/qt_rcc.gypi \
        -e "s,/usr/bin/rcc,rcc,g"
  
negative.code: { mkDerivation, lib, fetchgit, pkgconfig, gyp, cmake, gcc7
  , qtbase, qtimageformats
  , gtk3, libappindicator-gtk3, dee
  , ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3
  }:
  
  mkDerivation rec {
    name = "telegram-desktop-${version}";
    version = "1.2.1";
  
    # Submodules
    src = fetchgit {
      url = "git://github.com/telegramdesktop/tdesktop";
      rev = "v${version}";
      sha256 = "1wgcwm9lcy9zw7jawsjj4c46p9mky611k6gjw1900llwxkfh4fh5";
      fetchSubmodules = true;
    };
  
    tgaur = fetchgit {
      url = "https://aur.archlinux.org/telegram-desktop-systemqt.git";
      rev = "1ed27ce40913b9e6e87faf7a2310660c2790b98e";
      sha256 = "1i7ipqgisaw54g1nbg2cvpbx89g9gyjjb3sak1486pxsasp1qhyc";
    };
  
    buildInputs = [
      gtk3 libappindicator-gtk3 dee qtbase qtimageformats ffmpeg openalSoft minizip
      libopus alsaLib libpulseaudio range-v3
    ];
  
    nativeBuildInputs = [ pkgconfig gyp cmake gcc7 ];
  
    patches = [ "${tgaur}/tdesktop.patch" ];
  
  