+ 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/"
+ '';
+ };