Merge pull request #180957 from sikmir/pidgin-telegram
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, libwebp, pidgin, tdlib } :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tdlib-purple";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ars3niy";
|
||||
repo = "tdlib-purple";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-mrowzTtNLyMc2WwLVIop8Mg2DbyiQs0OPXmJuM9QUnM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Update to tdlib 1.8.0
|
||||
(fetchpatch {
|
||||
url = "https://github.com/ars3niy/tdlib-purple/commit/8c87b899ddbec32ec6ab4a34ddf0dc770f97d396.patch";
|
||||
sha256 = "sha256-sysPYPno+wS8mZwQAXtX5eVnhwKAZrtr5gXuddN3mko=";
|
||||
})
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i -e 's|DESTINATION.*PURPLE_PLUGIN_DIR}|DESTINATION "lib/purple-2|' CMakeLists.txt
|
||||
sed -i -e 's|DESTINATION.*PURPLE_DATA_DIR}|DESTINATION "share|' CMakeLists.txt
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ libwebp pidgin tdlib ];
|
||||
|
||||
cmakeFlags = [ "-DNoVoip=True" ]; # libtgvoip required
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/ars3niy/tdlib-purple";
|
||||
description = "libpurple Telegram plugin using tdlib";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
{ lib, stdenv, fetchFromGitHub, pkg-config, pidgin, libwebp, libgcrypt, gettext } :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "telegram-purple";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "majn";
|
||||
repo = "telegram-purple";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-14VzCMvzAEmye0N98r+P+ub5CeA9vu8c/xqefuWVI10=";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ pidgin libwebp libgcrypt gettext ];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i "s|/etc/telegram-purple/server.tglpub|$out/lib/purple-2/server.tglpub|g" telegram-purple.c
|
||||
echo "#define GIT_COMMIT \"${builtins.substring 0 10 src.rev}\"" > commit.h
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/purple-2/
|
||||
cp bin/*.so $out/lib/purple-2/ #*/
|
||||
cp tg-server.tglpub $out/lib/purple-2/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 = with lib; {
|
||||
homepage = "https://github.com/majn/telegram-purple";
|
||||
description = "Telegram for Pidgin / libpurple";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.jagajaga ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -29480,7 +29480,7 @@ with pkgs;
|
||||
|
||||
purple-xmpp-http-upload = callPackage ../applications/networking/instant-messengers/pidgin-plugins/purple-xmpp-http-upload { };
|
||||
|
||||
telegram-purple = callPackage ../applications/networking/instant-messengers/pidgin-plugins/telegram-purple { };
|
||||
tdlib-purple = callPackage ../applications/networking/instant-messengers/pidgin-plugins/tdlib-purple { };
|
||||
|
||||
toxprpl = callPackage ../applications/networking/instant-messengers/pidgin-plugins/tox-prpl {
|
||||
libtoxcore = libtoxcore-new;
|
||||
|
||||
Reference in New Issue
Block a user