<commit_before>{ stdenv, fetchgit, pkgconfig, pidgin, libwebp, libgcrypt, gettext } :

let
  version = "1.3.0";
in
stdenv.mkDerivation rec {
  name = "telegram-purple-${version}";

  src = fetchgit {
    url = "https://github.com/majn/telegram-purple";
    rev = "0340e4f14b2480782db4e5b9242103810227c522";
    sha256 = "1xb7hrgisbpx00dsrm5yz934bdd7nfzicd7k855iynk3hjzqj7k5";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ pidgin libwebp libgcrypt gettext ];

  preConfigure = ''
    sed -i "s|/etc/telegram-purple/server.tglpub|$out/lib/purple-2/server.tglpub|g" telegram-purple.c
    echo "#define GIT_COMMIT \"${builtins.substring 0 10 src.rev}\"" > commit.h
  '';

  installPhase = ''
    mkdir -p $out/lib/purple-2/
    cp bin/*.so $out/lib/purple-2/ #*/
    cp tg-server.tglpub $out/lib/purple-2/server.tglpub
    mkdir -p $out/pixmaps/pidgin/protocols/{16,22,48}
    cp imgs/telegram16.png $out/pixmaps/pidgin/protocols/16
    cp imgs/telegram22.png $out/pixmaps/pidgin/protocols/22
    cp imgs/telegram48.png $out/pixmaps/pidgin/protocols/48
  '';

  meta = with stdenv.lib; {
    homepage = https://github.com/majn/telegram-purple;
    description = "Telegram for Pidgin / libpurple";
    license = licenses.gpl2;
    maintainers = [ maintainers.jagajaga ];<commit_msg>telegram-purple: 1.3.0 -> 1.3.1, fix gcc8 build<commit_after>{ stdenv, fetchgit, pkgconfig, pidgin, libwebp, libgcrypt, gettext } :

let
  version = "1.3.1";
in
stdenv.mkDerivation rec {
  name = "telegram-purple-${version}";

  src = fetchgit {
    url = "https://github.com/majn/telegram-purple";
    rev = "v${version}";
    sha256 = "0p93jpjpx7hszwffzgixw04zkrpsiyzz4za3gfr4j07krc4771fp";
  };

  NIX_CFLAGS_COMPILE = [ "-Wno-error=cast-function-type" ];

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ pidgin libwebp libgcrypt gettext ];

  preConfigure = ''
    sed -i "s|/etc/telegram-purple/server.tglpub|$out/lib/purple-2/server.tglpub|g" telegram-purple.c
    echo "#define GIT_COMMIT \"${builtins.substring 0 10 src.rev}\"" > commit.h
  '';

  installPhase = ''
    mkdir -p $out/lib/purple-2/
    cp bin/*.so $out/lib/purple-2/ #*/
    cp tg-server.tglpub $out/lib/purple-2/server.tglpub
    mkdir -p $out/pixmaps/pidgin/protocols/{16,22,48}
    cp imgs/telegram16.png $out/pixmaps/pidgin/protocols/16
    cp imgs/telegram22.png $out/pixmaps/pidgin/protocols/22
    cp imgs/telegram48.png $out/pixmaps/pidgin/protocols/48
  '';

  meta = with stdenv.lib; {
    homepage = https://github.com/majn/telegram-purple;
    description = "Telegram for Pidgin / libpurple";
    license = licenses.gpl2;
    maintainers = [ maintainers.jagajaga ];
{'fraction_non_alphanumeric': 0.14981132075471698, 'fraction_numerical': 0.050566037735849056, 'mean_word_length': 3.440536013400335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '6992055', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1078, 'n_words': 167}