2019-08-02 23:19:14 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, systemd }:
|
2019-03-01 07:18:57 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-10-25 22:37:40 +01:00
|
|
|
version = "0.4.0";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "grafana-loki";
|
2019-03-01 07:18:57 +00:00
|
|
|
goPackagePath = "github.com/grafana/loki";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "grafana";
|
|
|
|
repo = "loki";
|
2019-10-25 22:37:40 +01:00
|
|
|
sha256 = "1anwq5dbh29dma18hnialbb253ciazzxmnqvympbh29ricldcf8p";
|
2019-03-01 07:18:57 +00:00
|
|
|
};
|
|
|
|
|
2019-08-02 23:19:14 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ systemd.dev ];
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
wrapProgram $bin/bin/promtail \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${systemd.lib}/lib"
|
|
|
|
'';
|
|
|
|
|
2019-03-01 07:18:57 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Like Prometheus, but for logs.";
|
|
|
|
license = licenses.asl20;
|
2019-08-02 23:19:14 +01:00
|
|
|
homepage = "https://grafana.com/loki";
|
2019-08-20 18:36:05 +01:00
|
|
|
maintainers = with maintainers; [ willibutz globin ];
|
2019-03-01 07:18:57 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|