2019-08-02 23:19:14 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, systemd }:
|
2019-03-01 07:18:57 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-18 20:47:31 +01:00
|
|
|
version = "0.3.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-08-18 20:47:31 +01:00
|
|
|
sha256 = "1b61fqk6ah4qps4nq7ypdax4i7pkhjxdw4qrhc1zvzzhxr7x13rs";
|
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;
|
|
|
|
};
|
|
|
|
}
|