2019-08-02 23:19:14 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, systemd }:
|
2019-03-01 07:18:57 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-12-09 18:12:53 +00:00
|
|
|
version = "1.2.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-12-09 18:12:53 +00:00
|
|
|
sha256 = "04ix58gb9yy5jf8fhn3k1pbwqs69k7m96cck38ymhwml1793b4k9";
|
2019-03-01 07:18:57 +00:00
|
|
|
};
|
|
|
|
|
2019-08-02 23:19:14 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2019-12-15 03:22:22 +00:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isLinux [ systemd.dev ];
|
2019-08-02 23:19:14 +01:00
|
|
|
|
2019-12-15 03:22:22 +00:00
|
|
|
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
|
2019-08-02 23:19:14 +01:00
|
|
|
wrapProgram $bin/bin/promtail \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${systemd.lib}/lib"
|
|
|
|
'';
|
|
|
|
|
2019-03-01 07:18:57 +00:00
|
|
|
meta = with stdenv.lib; {
|
2019-11-21 12:18:43 +00:00
|
|
|
description = "Like Prometheus, but for logs";
|
2019-03-01 07:18:57 +00:00
|
|
|
license = licenses.asl20;
|
2019-12-15 03:22:22 +00:00
|
|
|
homepage = "https://grafana.com/oss/loki/";
|
2019-11-21 12:18:43 +00:00
|
|
|
maintainers = with maintainers; [ willibutz globin mmahut ];
|
2019-12-15 03:22:22 +00:00
|
|
|
platforms = platforms.unix;
|
2019-03-01 07:18:57 +00:00
|
|
|
};
|
|
|
|
}
|