2016-03-23 16:22:35 +00:00
|
|
|
{ stdenv, fetchgit, pkgconfig, pidgin, libwebp, libgcrypt, gettext } :
|
|
|
|
|
|
|
|
let
|
2019-01-11 13:03:40 +00:00
|
|
|
version = "1.3.1";
|
2016-03-23 16:22:35 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "telegram-purple";
|
|
|
|
inherit version;
|
2016-03-23 16:22:35 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/majn/telegram-purple";
|
2019-01-11 13:03:40 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0p93jpjpx7hszwffzgixw04zkrpsiyzz4za3gfr4j07krc4771fp";
|
2016-03-23 16:22:35 +00:00
|
|
|
};
|
|
|
|
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type";
|
2019-01-11 13:03:40 +00:00
|
|
|
|
2016-03-23 16:22:35 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ pidgin libwebp libgcrypt gettext ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2018-04-01 23:10:05 +01:00
|
|
|
sed -i "s|/etc/telegram-purple/server.tglpub|$out/lib/purple-2/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 = ''
|
2018-04-01 23:10:05 +01:00
|
|
|
mkdir -p $out/lib/purple-2/
|
|
|
|
cp bin/*.so $out/lib/purple-2/ #*/
|
|
|
|
cp tg-server.tglpub $out/lib/purple-2/server.tglpub
|
2016-03-23 16:22:35 +00:00
|
|
|
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; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/majn/telegram-purple";
|
2016-03-23 16:22:35 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|