anchor.diff:      "-DDESKTOP_APP_USE_GLIBC_WRAPS=OFF"
       "-DDESKTOP_APP_USE_PACKAGED=ON"
       "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF"
  +    "-DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF"
       "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON"
       "-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=ON"
       "-DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON"
  
positive.code: 
  mkDerivation rec {
    pname = "telegram-desktop";
    version = "1.9.9";
  
    # Telegram-Desktop with submodules
    src = fetchurl {
      url = "https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz";
      sha256 = "08bxlqiapj9yqj9ywni33n5k7n3ckgfhv200snjqyqy9waqph1i6";
    };
  
    postPatch = ''
      substituteInPlace Telegram/SourceFiles/platform/linux/linux_libs.cpp \
        --replace '"appindicator3"' '"${libappindicator-gtk3}/lib/libappindicator3.so"'
      substituteInPlace Telegram/lib_spellcheck/spellcheck/platform/linux/linux_enchant.cpp \
        --replace '"libenchant-2.so.2"' '"${enchant2}/lib/libenchant-2.so.2"'
      substituteInPlace Telegram/CMakeLists.txt \
  
negative.code: { mkDerivation, lib, fetchurl, fetchsvn
  , pkgconfig, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook
  , qtbase, qtimageformats, gtk3, libsForQt5, enchant2, lz4, xxHash
  , dee, ffmpeg_4, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3
  , tl-expected, microsoft_gsl
  # TODO: Shouldn't be required:
  , pcre, xorg, utillinux, libselinux, libsepol, epoxy, at-spi2-core, libXtst
  , xdg_utils
  