2016-03-23 16:22:35 +00:00
|
|
|
{ stdenv, fetchgit, pkgconfig, pidgin, libwebp, libgcrypt, gettext } :
|
|
|
|
|
|
|
|
let
|
2017-01-30 05:40:50 +00:00
|
|
|
version = "1.3.0";
|
2016-03-23 16:22:35 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "telegram-purple-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/majn/telegram-purple";
|
2017-01-30 05:40:50 +00:00
|
|
|
rev = "0340e4f14b2480782db4e5b9242103810227c522";
|
|
|
|
sha256 = "1xb7hrgisbpx00dsrm5yz934bdd7nfzicd7k855iynk3hjzqj7k5";
|
2016-03-23 16:22:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ pidgin libwebp libgcrypt gettext ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i "s|/etc/telegram-purple/server.tglpub|$out/lib/pidgin/server.tglpub|g" telegram-purple.c
|
2017-01-30 05:40:50 +00:00
|
|
|
echo "#define GIT_COMMIT \"${builtins.substring 0 10 src.rev}\"" > commit.h
|
2016-03-23 16:22:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/pidgin/
|
2016-11-20 17:05:18 +00:00
|
|
|
cp bin/*.so $out/lib/pidgin/ #*/
|
2016-03-23 16:22:35 +00:00
|
|
|
cp tg-server.tglpub $out/lib/pidgin/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
|
|
|
|
'';
|
|
|
|
|
2016-11-20 17:05:18 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-03-23 16:22:35 +00:00
|
|
|
homepage = https://github.com/majn/telegram-purple;
|
|
|
|
description = "Telegram for Pidgin / libpurple";
|
2016-11-20 17:05:18 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.jagajaga ];
|
|
|
|
platforms = platforms.linux;
|
2016-03-23 16:22:35 +00:00
|
|
|
};
|
|
|
|
}
|