2015-08-28 21:36:46 +01:00
|
|
|
{ stdenv, fetchgit, bash, libconfig, libevent, openssl,
|
|
|
|
readline, zlib, lua5_2, python, pkgconfig, jansson
|
2014-03-04 21:50:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-08-04 15:11:36 +01:00
|
|
|
name = "telegram-cli-2015-07-30";
|
2014-03-04 21:50:01 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/vysheng/tg.git";
|
2015-08-04 15:11:36 +01:00
|
|
|
sha256 = "0phn9nl0sf2fylzfwi427xq60cfrnpsvhh8bp55y1wcjkmp0fxsn";
|
|
|
|
rev = "2052f4b381337d75e783facdbfad56b04dec1a9c";
|
2014-03-04 21:50:01 +00:00
|
|
|
};
|
|
|
|
|
2015-08-28 21:36:46 +01:00
|
|
|
buildInputs = [
|
|
|
|
libconfig libevent openssl readline zlib
|
|
|
|
lua5_2 python pkgconfig jansson
|
|
|
|
];
|
2014-03-04 21:50:01 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2015-08-04 15:11:36 +01:00
|
|
|
cp ./bin/telegram-cli $out/bin/telegram-wo-key
|
|
|
|
cp ./tg-server.pub $out/
|
|
|
|
cat > $out/bin/telegram-cli <<EOF
|
|
|
|
#!${bash}/bin/sh
|
2015-08-28 21:36:46 +01:00
|
|
|
$out/bin/telegram-wo-key -k $out/tg-server.pub "\$@"
|
2014-03-04 21:50:01 +00:00
|
|
|
EOF
|
2015-08-04 15:11:36 +01:00
|
|
|
chmod +x $out/bin/telegram-cli
|
2014-03-04 21:50:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Command-line interface for Telegram messenger";
|
|
|
|
homepage = https://telegram.org/;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2014-03-04 21:50:01 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2015-08-14 21:37:50 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.jagajaga ];
|
2014-03-04 21:50:01 +00:00
|
|
|
};
|
|
|
|
}
|