2014-03-05 01:50:01 +04:00
|
|
|
{ stdenv, fetchgit, libconfig, lua5_2, openssl, readline, zlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "telegram-cli";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/vysheng/tg.git";
|
|
|
|
rev = "ac6079a00ac66bb37a3179a82af130b41ec39bc9";
|
|
|
|
sha256 = "1rpwnyzmqk7p97n5pd00m5c6rypc39mb3hs94qxxrdcpwpgcb73q";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libconfig lua5_2 openssl readline zlib ];
|
|
|
|
|
2014-09-06 23:28:03 +04:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; # CPPFunction
|
|
|
|
|
2014-03-05 01:50:01 +04:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ./telegram $out/bin/telegram-wo-key
|
|
|
|
cp ./tg.pub $out/
|
|
|
|
cat > $out/bin/telegram <<EOF
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
$out/bin/telegram-wo-key -k $out/tg.pub
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/telegram
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Command-line interface for Telegram messenger";
|
|
|
|
homepage = https://telegram.org/;
|
2014-06-19 08:19:00 +04:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2014-03-05 01:50:01 +04:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|