Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
65 lines
1.4 KiB
Nix
65 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
go,
|
|
nix-update-script,
|
|
nixosTests,
|
|
testers,
|
|
thanos,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "thanos";
|
|
version = "0.39.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "thanos-io";
|
|
repo = "thanos";
|
|
tag = "v${version}";
|
|
hash = "sha256-yKw+HGlqEgQmydZ+PIk5y/z5H57nZ0dtw/kEh8079Ws=";
|
|
};
|
|
|
|
vendorHash = "sha256-6qTxCAD1hbS77erG1Z52JU2iOXAU+qtY3yivX+4bjlw=";
|
|
|
|
subPackages = "cmd/thanos";
|
|
|
|
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"
|
|
"-X ${t}.GoVersion=${lib.getVersion go}"
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
tests = {
|
|
inherit (nixosTests) thanos;
|
|
version = testers.testVersion {
|
|
command = "thanos --version";
|
|
package = thanos;
|
|
};
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
description = "Highly available Prometheus setup with long term storage capabilities";
|
|
homepage = "https://github.com/thanos-io/thanos";
|
|
changelog = "https://github.com/thanos-io/thanos/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
mainProgram = "thanos";
|
|
maintainers = with lib.maintainers; [
|
|
basvandijk
|
|
anthonyroussel
|
|
];
|
|
};
|
|
}
|