nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 465dfdf3c5a548ea7e1632188f3e1c335787ac5f
parent 63cae8e9cd3047f1904f89d54707deac9b6f2521
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Mon,  4 Nov 2024 17:59:20 +0400

Add tg-spam

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/misc/tg-spam/default.nix | 39+++++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -406,6 +406,7 @@ lib.makeScope newScope ( telegram-send = callPackage ./misc/telegram-send { }; telnetpp = callPackage ./misc/telnetpp { }; terminalpp = callPackage ./misc/terminalpp { }; + tg-spam = callPackage ./misc/tg-spam { }; tiny-frpc = callPackage ./misc/tiny-frpc { }; tinyflux = callPackage ./misc/tinyflux { }; tlstunnel = callPackage ./misc/tlstunnel { }; diff --git a/pkgs/misc/tg-spam/default.nix b/pkgs/misc/tg-spam/default.nix @@ -0,0 +1,39 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: + +buildGoModule rec { + pname = "tg-spam"; + version = "1.14.1"; + + src = fetchFromGitHub { + owner = "umputun"; + repo = "tg-spam"; + rev = "v${version}"; + hash = "sha256-qx53EdHGp1JvOV4dvkQ7/pK8L+y2uurWgNdm0DEhOuE="; + }; + + vendorHash = null; + + ldflags = [ + "-s" + "-w" + "-X main.revision=${version}" + ]; + + postInstall = '' + mv $out/bin/{app,tg-spam} + ''; + + doCheck = false; + + meta = { + description = "Anti-Spam bot for Telegram and anti-spam library"; + homepage = "https://tg-spam.umputun.dev/"; + license = lib.licenses.mit; + mainProgram = "tg-spam"; + maintainers = [ lib.maintainers.sikmir ]; + }; +}