2021-02-08 20:39:40 +00:00
|
|
|
{ lib
|
2020-08-13 18:20:46 +01:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
2020-09-29 15:18:09 +01:00
|
|
|
pname = "promscale";
|
2021-04-11 15:06:09 +01:00
|
|
|
version = "0.3.0";
|
2020-08-13 18:20:46 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "timescale";
|
|
|
|
repo = pname;
|
2020-11-01 22:39:49 +00:00
|
|
|
rev = version;
|
2021-04-11 15:06:09 +01:00
|
|
|
sha256 = "sha256-kZYFOuY6FFM35mP+o/YU5SM5H9ziOq9BQ8T1RX7rhGE=";
|
2020-08-13 18:20:46 +01:00
|
|
|
};
|
|
|
|
|
2021-04-11 15:06:09 +01:00
|
|
|
vendorSha256 = "sha256-1VOhDOfFE4BpDR4XfhLoXJFuTDkG1nx88tVvTF3ZVxU=";
|
2020-08-13 18:20:46 +01:00
|
|
|
|
2020-09-29 15:18:09 +01:00
|
|
|
buildFlagsArray = [ "-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 10:20:00 +01:00
|
|
|
|
2020-10-29 09:02:35 +00:00
|
|
|
doCheck = false; # Requires access to a docker daemon
|
2021-02-08 20:39:40 +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-13 18:20:46 +01:00
|
|
|
|
2021-02-08 20:39:40 +00:00
|
|
|
meta = with lib; {
|
2020-08-13 18:20:46 +01:00
|
|
|
description = "An open-source analytical platform for Prometheus metrics";
|
2020-09-29 15:18:09 +01:00
|
|
|
homepage = "https://github.com/timescale/promscale";
|
2020-08-13 18:20:46 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
2020-07-29 11:49:07 +01:00
|
|
|
maintainers = with maintainers; [ _0x4A6F ];
|
2020-08-13 18:20:46 +01:00
|
|
|
};
|
|
|
|
}
|