<commit_before>{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, libwebp, pidgin, tdlib } :

stdenv.mkDerivation rec {
  pname = "tdlib-purple";
  version = "0.8.1";

  src = fetchFromGitHub {
    owner = "ars3niy";
    repo = "tdlib-purple";
    rev = "v${version}";
    sha256 = "sha256-mrowzTtNLyMc2WwLVIop8Mg2DbyiQs0OPXmJuM9QUnM=";
  };

  patches = [
    # Update to tdlib 1.8.0
    (fetchpatch {
      url = "https://github.com/ars3niy/tdlib-purple/commit/8c87b899ddbec32ec6ab4a34ddf0dc770f97d396.patch";
      sha256 = "sha256-sysPYPno+wS8mZwQAXtX5eVnhwKAZrtr5gXuddN3mko=";
    })
  ];

  preConfigure = ''
    sed -i -e 's|DESTINATION.*PURPLE_PLUGIN_DIR}|DESTINATION "lib/purple-2|' CMakeLists.txt
    sed -i -e 's|DESTINATION.*PURPLE_DATA_DIR}|DESTINATION "share|' CMakeLists.txt
  '';

  nativeBuildInputs = [ cmake ];
  buildInputs = [ libwebp pidgin tdlib ];

  cmakeFlags = [ "-DNoVoip=True" ]; # libtgvoip required

  meta = with lib; {
    homepage = "https://github.com/ars3niy/tdlib-purple";
    description = "libpurple Telegram plugin using tdlib";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ sikmir ];
    platforms = platforms.unix;
  };
}<commit_msg>tdlib-purple: fix build on aarch64-darwin<commit_after>{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, libwebp, pidgin, tdlib } :

stdenv.mkDerivation rec {
  pname = "tdlib-purple";
  version = "0.8.1";

  src = fetchFromGitHub {
    owner = "ars3niy";
    repo = "tdlib-purple";
    rev = "v${version}";
    sha256 = "sha256-mrowzTtNLyMc2WwLVIop8Mg2DbyiQs0OPXmJuM9QUnM=";
  };

  patches = [
    # Update to tdlib 1.8.0
    (fetchpatch {
      url = "https://github.com/ars3niy/tdlib-purple/commit/8c87b899ddbec32ec6ab4a34ddf0dc770f97d396.patch";
      sha256 = "sha256-sysPYPno+wS8mZwQAXtX5eVnhwKAZrtr5gXuddN3mko=";
    })
  ];

  preConfigure = ''
    sed -i -e 's|DESTINATION.*PURPLE_PLUGIN_DIR}|DESTINATION "lib/purple-2|' CMakeLists.txt
    sed -i -e 's|DESTINATION.*PURPLE_DATA_DIR}|DESTINATION "share|' CMakeLists.txt
  '';

  nativeBuildInputs = [ cmake ];
  buildInputs = [ libwebp pidgin tdlib ];

  cmakeFlags = [ "-DNoVoip=True" ]; # libtgvoip required

  NIX_CFLAGS_COMPILE = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "-U__ARM_NEON__" ];

  meta = with lib; {
    homepage = "https://github.com/ars3niy/tdlib-purple";
    description = "libpurple Telegram plugin using tdlib";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ sikmir ];
    platforms = platforms.unix;
  };
}
{'fraction_non_alphanumeric': 0.13737133808392715, 'fraction_numerical': 0.043547110055423596, 'mean_word_length': 3.688311688311688, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3025151', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1064, 'n_words': 163}