2016-03-23 16:22:35 +00:00
|
|
|
{ stdenv, fetchgit, pkgconfig, pidgin, libwebp, libgcrypt, gettext } :
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "2016-03-17";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "telegram-purple-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/majn/telegram-purple";
|
|
|
|
rev = "ee2a6fb740fe9580336e4af9a153b845bc715927";
|
2016-05-26 20:51:23 +01:00
|
|
|
sha256 = "0pxaj95b6nzy73dckpr3v4nljyijkx71vmnp9dcj48d22pvy0nyf";
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/pidgin/
|
|
|
|
cp bin/*.so $out/lib/pidgin/
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/majn/telegram-purple;
|
|
|
|
description = "Telegram for Pidgin / libpurple";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
maintainers = stdenv.lib.maintainers.jagajaga;
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2016-03-23 16:22:35 +00:00
|
|
|
};
|
|
|
|
}
|