toxic: 0.15.1 -> 0.16.0
[NixPkgs.git] / pkgs / by-name / me / mercure / package.nix
blobe1aebcc85a63a493e00cdeefca6bb7b0cafc1634
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   nix-update-script,
6   testers,
7   mercure,
8 }:
10 buildGoModule rec {
11   pname = "mercure";
12   version = "0.17.1";
14   src = fetchFromGitHub {
15     owner = "dunglas";
16     repo = "mercure";
17     rev = "v${version}";
18     hash = "sha256-TRKlX4dNCvD9wBp+JNpmB9J1lt0Eyc0pQ/ucvtiDGto=";
19   };
21   sourceRoot = "${src.name}/caddy";
23   vendorHash = "sha256-0tyvb11rBtrTbA+eAV1E5Y2tZeAwtrpONHBOLaVxuaQ=";
25   subPackages = [ "mercure" ];
26   excludedPackages = [ "../cmd/mercure" ];
28   ldflags = [
29     "-s"
30     "-w"
31     "-X 'github.com/caddyserver/caddy/v2.CustomVersion=Mercure.rocks v${version} Caddy'"
32   ];
34   doCheck = false;
36   passthru = {
37     updateScript = nix-update-script { };
38     tests.version = testers.testVersion {
39       version = "v${version}";
40       package = mercure;
41       command = "mercure version";
42     };
43   };
45   meta = with lib; {
46     description = "Open, easy, fast, reliable and battery-efficient solution for real-time communications";
47     homepage = "https://github.com/dunglas/mercure";
48     changelog = "https://github.com/dunglas/mercure/releases/tag/v${version}";
49     license = licenses.agpl3Only;
50     maintainers = with maintainers; [ gaelreyrol ];
51     platforms = platforms.unix;
52     mainProgram = "mercure";
53   };