]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.git/blame - pkgs/telegram-cli/default.nix
Add some tools in environment
[perso/Immae/Config/Nix/NUR.git] / pkgs / telegram-cli / default.nix
CommitLineData
24fd1fe6
IB
1{ stdenv, mylibs, pkgconfig, libevent, lua, jansson, openssl, readline, zlib, libconfig }:
2stdenv.mkDerivation (mylibs.fetchedGithub ./telegram-cli.json // {
3 patches = [
4 ./telegram-cli.patch
5 ];
6 buildInputs = [ pkgconfig libevent lua jansson openssl readline zlib libconfig ];
7 preBuild = ''
8 sed -i -e 's@"/etc/" PROG_NAME "/server.pub"@"'$out'/etc/server.pub"@' main.c
9 '';
10 installPhase = ''
11 mkdir -p $out
12 install -Dm755 bin/telegram-cli $out/bin/telegram-cli
13 install -Dm644 tg-server.pub $out/etc/server.pub
14 install -Dm644 debian/telegram-cli.8 $out/man/man8/telegram-cli.8
15 '';
16})