3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/telegram-purple/default.nix

44 lines
1.3 KiB
Nix
Raw Normal View History

2016-03-23 16:22:35 +00:00
{ stdenv, fetchgit, pkgconfig, pidgin, libwebp, libgcrypt, gettext } :
let
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";
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";
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/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 = ''
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
'';
meta = with stdenv.lib; {
homepage = "https://github.com/majn/telegram-purple";
2016-03-23 16:22:35 +00:00
description = "Telegram for Pidgin / libpurple";
license = licenses.gpl2;
maintainers = [ maintainers.jagajaga ];
platforms = platforms.linux;
2016-03-23 16:22:35 +00:00
};
}