2023-06-04 11:15:47 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
|
2019-04-23 14:19:10 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "thanos";
|
2023-04-10 13:43:43 +00:00
|
|
|
version = "0.31.0";
|
2019-04-23 14:19:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
2019-08-27 21:57:35 +00:00
|
|
|
owner = "thanos-io";
|
2019-04-23 14:19:10 +00:00
|
|
|
repo = "thanos";
|
2023-04-10 13:43:43 +00:00
|
|
|
sha256 = "sha256-EJZGc4thu0WhVSSRolIRYg39S81Cgm+JHwpW5eE7mDc=";
|
2019-04-23 14:19:10 +00:00
|
|
|
};
|
|
|
|
|
2023-06-04 11:15:47 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/thanos-io/thanos/pull/6126
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/thanos-io/thanos/commit/a4c218bd690259fc0c78fe67e0739bd33d38541e.patch";
|
|
|
|
hash = "sha256-Hxc1s5IXAyw01/o4JvOXuyYuOFy0+cBUv3OkRv4DCXs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
vendorHash = "sha256-8+MUMux6v/O2syVyTx758yUBfJkertzibz6yFB05nWk=";
|
2019-04-23 14:19:10 +00:00
|
|
|
|
2023-05-13 07:58:44 +00:00
|
|
|
doCheck = true;
|
2020-08-04 00:26:27 +00:00
|
|
|
|
2019-04-23 14:19:10 +00:00
|
|
|
subPackages = "cmd/thanos";
|
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = let t = "github.com/prometheus/common/version"; in [
|
|
|
|
"-X ${t}.Version=${version}"
|
|
|
|
"-X ${t}.Revision=unknown"
|
|
|
|
"-X ${t}.Branch=unknown"
|
|
|
|
"-X ${t}.BuildUser=nix@nixpkgs"
|
|
|
|
"-X ${t}.BuildDate=unknown"
|
|
|
|
];
|
2019-04-23 14:19:10 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-04-23 14:19:10 +00:00
|
|
|
description = "Highly available Prometheus setup with long term storage capabilities";
|
2019-08-27 21:57:35 +00:00
|
|
|
homepage = "https://github.com/thanos-io/thanos";
|
2019-04-23 14:19:10 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ basvandijk ];
|
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|