nur-packages

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

default.nix (693B)


      1 {
      2   lib,
      3   buildGoModule,
      4   fetchFromGitHub,
      5 }:
      6 
      7 buildGoModule rec {
      8   pname = "tg-spam";
      9   version = "1.14.1";
     10 
     11   src = fetchFromGitHub {
     12     owner = "umputun";
     13     repo = "tg-spam";
     14     rev = "v${version}";
     15     hash = "sha256-qx53EdHGp1JvOV4dvkQ7/pK8L+y2uurWgNdm0DEhOuE=";
     16   };
     17 
     18   vendorHash = null;
     19 
     20   ldflags = [
     21     "-s"
     22     "-w"
     23     "-X main.revision=${version}"
     24   ];
     25 
     26   postInstall = ''
     27     mv $out/bin/{app,tg-spam}
     28   '';
     29 
     30   doCheck = false;
     31 
     32   meta = {
     33     description = "Anti-Spam bot for Telegram and anti-spam library";
     34     homepage = "https://tg-spam.umputun.dev/";
     35     license = lib.licenses.mit;
     36     mainProgram = "tg-spam";
     37     maintainers = [ lib.maintainers.sikmir ];
     38   };
     39 }