nixpkgs/pkgs/servers/monitoring/thanos/default.nix
Pascal Bach 3757137462 thanos: pin to Go 1.19
It panics when running with Go 1.20 with the following error:

```
panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc
to declare that it assumes a non-moving garbage collector,
but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated
to assert that it's safe against the go1.20 runtime.
If you want to risk it, run with environment variable
ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.20 set.
Notably, if go1.20 adds a moving garbage collector,
this program is unsafe to use.
```
2023-05-13 10:04:51 +02:00

35 lines
915 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "thanos";
version = "0.31.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "thanos-io";
repo = "thanos";
sha256 = "sha256-EJZGc4thu0WhVSSRolIRYg39S81Cgm+JHwpW5eE7mDc=";
};
vendorHash = "sha256-bNQwDttJ7YuQFrpp0alqe37/lue0CX5gB2UDRWWtTXQ=";
doCheck = true;
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"
];
meta = with lib; {
description = "Highly available Prometheus setup with long term storage capabilities";
homepage = "https://github.com/thanos-io/thanos";
license = licenses.asl20;
maintainers = with maintainers; [ basvandijk ];
platforms = platforms.unix;
};
}