diff options
Diffstat (limited to 'flakes/mypackages/pkgs/telegramircd/default.nix')
-rw-r--r-- | flakes/mypackages/pkgs/telegramircd/default.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/telegramircd/default.nix b/flakes/mypackages/pkgs/telegramircd/default.nix new file mode 100644 index 0000000..d9196a2 --- /dev/null +++ b/flakes/mypackages/pkgs/telegramircd/default.nix | |||
@@ -0,0 +1,22 @@ | |||
1 | { openssl, telethon, python3Packages, fetchFromGitHub }: | ||
2 | with python3Packages; | ||
3 | buildPythonApplication rec { | ||
4 | format = "other"; | ||
5 | pname = "telegramircd"; | ||
6 | version = "master"; | ||
7 | propagatedBuildInputs = [ telethon aiohttp ConfigArgParse openssl ]; | ||
8 | src = fetchFromGitHub { | ||
9 | owner = "MaskRay"; | ||
10 | repo = "telegramircd"; | ||
11 | rev = "40a0c7cf60492bde3f44d43f06f62e3792480139"; | ||
12 | sha256 = "123fjhgxq2fzn0ar8274jv7jjbxnlpidrj5333kbch7rpcipks0y"; | ||
13 | fetchSubmodules = true; | ||
14 | }; | ||
15 | LD_LIBRARY_PATH = "${openssl.out}/lib"; | ||
16 | installPhase = '' | ||
17 | install -D $src/telegramircd.py $out/bin/telegramircd | ||
18 | wrapProgram "$out/bin/telegramircd" \ | ||
19 | --prefix LD_LIBRARY_PATH : "${openssl.out}/lib" | ||
20 | install -Dm644 "$src/config" -t "$out/etc/telegramircd/" | ||
21 | ''; | ||
22 | } | ||