X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=default.nix;h=4bae440c3b65b4625be5dd499602b489c2b04783;hb=d784c053b0963b93b19889f8ded3f33b4c9fe724;hp=674a72f89f64ed8f5c1b8c52ce0bb9d7d010af76;hpb=0e2c16b8b8ac8987fe9cbf86195796ce688e628b;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/default.nix b/default.nix index 674a72f..4bae440 100644 --- a/default.nix +++ b/default.nix @@ -496,6 +496,43 @@ let ''; }; + mypkgs.telegramircd = with python3Packages; let + telethon = buildPythonPackage rec { + pname = "Telethon-sync"; + version = "1.1.1"; + + src = fetchPypi { + inherit pname version; + sha256 = + "01z8fzqn0qs5pxhvzq891r3mwffq1ga3f8xvm7qdn6kvmxjni9fy"; + }; + + propagatedBuildInputs = with self; [ + rsa pyaes async_generator + ]; + doCheck = false; + + meta = with lib; { + homepage = https://github.com/LonamiWebs/Telethon; + description = "Full-featured Telegram client library for Python 3"; + license = licenses.mit; + }; + }; + in + buildPythonApplication rec { + format = "other"; + pname = "telegramircd"; + version = "master"; + propagatedBuildInputs = [ telethon aiohttp ConfigArgParse openssl ]; + src = (fetchedGithub ./fetched/telegramircd.json).src; + LD_LIBRARY_PATH = "${openssl.out}/lib"; + installPhase = '' + install -D $src/telegramircd.py $out/bin/telegramircd + wrapProgram "$out/bin/telegramircd" \ + --prefix LD_LIBRARY_PATH : "${openssl.out}/lib" + install -Dm644 "$src/config" -t "$out/etc/telegramircd/" + ''; + }; # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks in