]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - pkgs/telegram-cli/default.nix
Add MX even for mail sending (for SPF)
[perso/Immae/Config/Nix.git] / pkgs / telegram-cli / default.nix
1 { stdenv, mylibs, pkgconfig, libevent, lua, jansson, openssl, readline, zlib, libconfig }:
2 stdenv.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 })