commit 2c2edc9fa4ffaa65af93af6132f2240a5508f8b6
parent a8d1fc3538abcd114d5b3c55ea63e95fa5ab9acb
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Tue, 25 Apr 2023 20:36:40 +0400
Add telegram-send
Diffstat:
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -369,6 +369,7 @@ lib.makeScope newScope (
taskcoach = callPackage ./misc/taskcoach { };
tcvt = callPackage ./misc/tcvt { };
telegabber = callPackage ./misc/telegabber { };
+ telegram-send = callPackage ./misc/telegram-send { };
telnetpp = callPackage ./misc/telnetpp { };
tinyflux = callPackage ./misc/tinyflux { };
tlstunnel = callPackage ./misc/tlstunnel { };
diff --git a/pkgs/misc/telegram-send/default.nix b/pkgs/misc/telegram-send/default.nix
@@ -0,0 +1,30 @@
+{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+ pname = "telegram-send";
+ version = "2022-05-13";
+
+ src = fetchFromGitHub {
+ owner = "rahiel";
+ repo = "telegram-send";
+ rev = "34d7703754d441a6f4c4a7b5b3210759d36078e2";
+ hash = "sha256-/+hNnUT7kA19wpiHGNPVMQGostjoaDzHd91WYruJq0w=";
+ };
+
+ patches = [
+ # Update for PTB v20
+ (fetchpatch {
+ url = "https://github.com/rahiel/telegram-send/commit/daf6c404ce9dfcd94cfec789aedd622942f11091.patch";
+ hash = "sha256-e236VJVw/sPT583yB5kHEingT7w+3CyCslpzETcHWXo=";
+ })
+ ];
+
+ propagatedBuildInputs = with python3Packages; [ appdirs colorama python-telegram-bot ];
+
+ meta = with lib; {
+ description = "Send messages and files over Telegram from the command-line";
+ homepage = "https://www.rahielkasim.com/telegram-send/";
+ license = licenses.gpl3Plus;
+ maintainers = [ maintainers.sikmir ];
+ };
+}