blob: 4b82b352d8f94d874e0e08eb0fdd4ea4ba189ac4 (
plain) (
tree)
|
|
{ stdenv, fetchedGithub, pkgconfig, libevent, lua, jansson, openssl, readline, zlib, libconfig }:
stdenv.mkDerivation (fetchedGithub ./telegram-cli.json // {
patches = [
./telegram-cli.patch
];
buildInputs = [ pkgconfig libevent lua jansson openssl readline zlib libconfig ];
preBuild = ''
sed -i -e 's@"/etc/" PROG_NAME "/server.pub"@"'$out'/etc/server.pub"@' main.c
'';
installPhase = ''
mkdir -p $out
install -Dm755 bin/telegram-cli $out/bin/telegram-cli
install -Dm644 tg-server.pub $out/etc/server.pub
install -Dm644 debian/telegram-cli.8 $out/man/man8/telegram-cli.8
'';
})
|