2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, go
|
|
|
|
, nix-update-script
|
|
|
|
, nixosTests
|
|
|
|
, testers
|
|
|
|
, thanos
|
|
|
|
}:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "thanos";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.35.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thanos-io";
|
|
|
|
repo = "thanos";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-XSQMFtMZvcUcOFi14EZiyq65GdPbzOqUVqFM0FLSj3E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
vendorHash = "sha256-i8EGUxNbxfyPQ3BVa7yBR1ygHIC64v6m/aDGFzWWfIE=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = "cmd/thanos";
|
|
|
|
|
2021-08-27 14:25:00 +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"
|
2024-01-02 11:29:13 +00:00
|
|
|
"-X ${t}.GoVersion=${lib.getVersion go}"
|
2021-08-27 14:25:00 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests = {
|
|
|
|
inherit (nixosTests) prometheus;
|
|
|
|
version = testers.testVersion {
|
|
|
|
command = "thanos --version";
|
|
|
|
package = thanos;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Highly available Prometheus setup with long term storage capabilities";
|
|
|
|
homepage = "https://github.com/thanos-io/thanos";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/thanos-io/thanos/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "thanos";
|
|
|
|
maintainers = with maintainers; [ basvandijk anthonyroussel ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|