From d784c053b0963b93b19889f8ded3f33b4c9fe724 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 1 Mar 2019 23:59:59 +0100 Subject: [PATCH] Add telegramircd --- default.nix | 37 +++++++++++++++++++++++++++++++++++++ fetched/telegramircd.json | 15 +++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 fetched/telegramircd.json 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 diff --git a/fetched/telegramircd.json b/fetched/telegramircd.json new file mode 100644 index 0000000..3d219f8 --- /dev/null +++ b/fetched/telegramircd.json @@ -0,0 +1,15 @@ +{ + "tag": "40a0c7c-master", + "meta": { + "name": "telegramircd", + "url": "https://github.com/MaskRay/telegramircd", + "branch": "master" + }, + "github": { + "owner": "MaskRay", + "repo": "telegramircd", + "rev": "40a0c7cf60492bde3f44d43f06f62e3792480139", + "sha256": "123fjhgxq2fzn0ar8274jv7jjbxnlpidrj5333kbch7rpcipks0y", + "fetchSubmodules": true + } +} -- 2.41.0