diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-01 23:59:59 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-02 00:51:06 +0100 |
commit | d784c053b0963b93b19889f8ded3f33b4c9fe724 (patch) | |
tree | bbdd2decc6ee4211dceee00c8b0428996b48b331 | |
parent | 0e2c16b8b8ac8987fe9cbf86195796ce688e628b (diff) | |
download | Nix-d784c053b0963b93b19889f8ded3f33b4c9fe724.tar.gz Nix-d784c053b0963b93b19889f8ded3f33b4c9fe724.tar.zst Nix-d784c053b0963b93b19889f8ded3f33b4c9fe724.zip |
Add telegramircd
-rw-r--r-- | default.nix | 37 | ||||
-rw-r--r-- | fetched/telegramircd.json | 15 |
2 files changed, 52 insertions, 0 deletions
diff --git a/default.nix b/default.nix index 674a72f..4bae440 100644 --- a/default.nix +++ b/default.nix | |||
@@ -496,6 +496,43 @@ let | |||
496 | ''; | 496 | ''; |
497 | }; | 497 | }; |
498 | 498 | ||
499 | mypkgs.telegramircd = with python3Packages; let | ||
500 | telethon = buildPythonPackage rec { | ||
501 | pname = "Telethon-sync"; | ||
502 | version = "1.1.1"; | ||
503 | |||
504 | src = fetchPypi { | ||
505 | inherit pname version; | ||
506 | sha256 = | ||
507 | "01z8fzqn0qs5pxhvzq891r3mwffq1ga3f8xvm7qdn6kvmxjni9fy"; | ||
508 | }; | ||
509 | |||
510 | propagatedBuildInputs = with self; [ | ||
511 | rsa pyaes async_generator | ||
512 | ]; | ||
513 | doCheck = false; | ||
514 | |||
515 | meta = with lib; { | ||
516 | homepage = https://github.com/LonamiWebs/Telethon; | ||
517 | description = "Full-featured Telegram client library for Python 3"; | ||
518 | license = licenses.mit; | ||
519 | }; | ||
520 | }; | ||
521 | in | ||
522 | buildPythonApplication rec { | ||
523 | format = "other"; | ||
524 | pname = "telegramircd"; | ||
525 | version = "master"; | ||
526 | propagatedBuildInputs = [ telethon aiohttp ConfigArgParse openssl ]; | ||
527 | src = (fetchedGithub ./fetched/telegramircd.json).src; | ||
528 | LD_LIBRARY_PATH = "${openssl.out}/lib"; | ||
529 | installPhase = '' | ||
530 | install -D $src/telegramircd.py $out/bin/telegramircd | ||
531 | wrapProgram "$out/bin/telegramircd" \ | ||
532 | --prefix LD_LIBRARY_PATH : "${openssl.out}/lib" | ||
533 | install -Dm644 "$src/config" -t "$out/etc/telegramircd/" | ||
534 | ''; | ||
535 | }; | ||
499 | # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh | 536 | # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh |
500 | # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks | 537 | # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks |
501 | in | 538 | 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 @@ | |||
1 | { | ||
2 | "tag": "40a0c7c-master", | ||
3 | "meta": { | ||
4 | "name": "telegramircd", | ||
5 | "url": "https://github.com/MaskRay/telegramircd", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "MaskRay", | ||
10 | "repo": "telegramircd", | ||
11 | "rev": "40a0c7cf60492bde3f44d43f06f62e3792480139", | ||
12 | "sha256": "123fjhgxq2fzn0ar8274jv7jjbxnlpidrj5333kbch7rpcipks0y", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||