biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / servers / monitoring / thanos / default.nix
blob76e87f8a0a7b4127add9b59b42d66d76123152cf
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , go
5 , nix-update-script
6 , nixosTests
7 , testers
8 , thanos
9 }:
11 buildGoModule rec {
12   pname = "thanos";
13   version = "0.34.1";
15   src = fetchFromGitHub {
16     owner = "thanos-io";
17     repo = "thanos";
18     rev = "refs/tags/v${version}";
19     hash = "sha256-AynKxORgO8fY8KAhzyIeHCw2MI2se5eHSPn0kt1RJq4=";
20   };
22   vendorHash = "sha256-4IT3YeGXSEzC0z+rC2yQCY9QQZeXxpMtJM/4/kINn3s=";
24   doCheck = true;
26   subPackages = "cmd/thanos";
28   ldflags = let t = "github.com/prometheus/common/version"; in [
29     "-X ${t}.Version=${version}"
30     "-X ${t}.Revision=unknown"
31     "-X ${t}.Branch=unknown"
32     "-X ${t}.BuildUser=nix@nixpkgs"
33     "-X ${t}.BuildDate=unknown"
34     "-X ${t}.GoVersion=${lib.getVersion go}"
35   ];
37   passthru = {
38     updateScript = nix-update-script { };
39     tests = {
40       inherit (nixosTests) prometheus;
41       version = testers.testVersion {
42         command = "thanos --version";
43         package = thanos;
44       };
45     };
46   };
48   meta = with lib; {
49     description = "Highly available Prometheus setup with long term storage capabilities";
50     homepage = "https://github.com/thanos-io/thanos";
51     changelog = "https://github.com/thanos-io/thanos/releases/tag/v${version}";
52     license = licenses.asl20;
53     mainProgram = "thanos";
54     maintainers = with maintainers; [ basvandijk anthonyroussel ];
55   };