summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/tdlib-purple/default.nix
blob: 445839a4b5875c6b5a526a1db54a6f10a41159ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchFromGitHub, cmake, tdlib, pidgin, libwebp, libtgvoip } :

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

  src = fetchFromGitHub {
    owner = "ars3niy";
    repo = pname;
    rev = "v${version}";
    sha256 = "1inamfzbrz0sy4y431jgwjfg6lz14a7c71khrg02481raxchhzzf";
  };

  cmakeFlags = [
    "-Dtgvoip_INCLUDE_DIRS=${libtgvoip.dev}/include/tgvoip"
  ];

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

  installPhase = ''
    mkdir -p $out/lib/purple-2/
    cp *.so $out/lib/purple-2/
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/ars3niy/tdlib-purple";
    description = "New libpurple plugin for Telegram";
    license = licenses.gpl2;
    maintainers = [ maintainers.lassulus ];
    platforms = platforms.linux;
  };
}