2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-08-20 17:08:02 +00:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
2020-10-07 09:15:18 +00:00
|
|
|
pname = "promscale";
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "0.5.1";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "timescale";
|
|
|
|
repo = pname;
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-u9qlABTuQ4EWEfyei6nN/AZ7j9QJXQ61GvyhP8wEmK0=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
vendorSha256 = "sha256-DFDTYT7UK1cYwGeCgeQcJmrCoqGPDzicusRPPUbH0Gs=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/timescale/promscale/pkg/version.Version=${version}" "-X github.com/timescale/promscale/pkg/version.CommitHash=${src.rev}" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
doCheck = false; # Requires access to a docker daemon
|
2021-02-13 14:23:35 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
if [[ "$("$out/bin/${pname}" -version)" == "${version}" ]]; then
|
|
|
|
echo '${pname} smoke check passed'
|
|
|
|
else
|
|
|
|
echo '${pname} smoke check failed'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
'';
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "An open-source analytical platform for Prometheus metrics";
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://github.com/timescale/promscale";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ _0x4A6F ];
|
|
|
|
};
|
|
|
|
}
|