nixpkgs/pkgs/servers/monitoring/loki/default.nix
2019-12-14 22:22:22 -05:00

33 lines
893 B
Nix

{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, systemd }:
buildGoPackage rec {
version = "1.2.0";
pname = "grafana-loki";
goPackagePath = "github.com/grafana/loki";
doCheck = true;
src = fetchFromGitHub {
rev = "v${version}";
owner = "grafana";
repo = "loki";
sha256 = "04ix58gb9yy5jf8fhn3k1pbwqs69k7m96cck38ymhwml1793b4k9";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = stdenv.lib.optionals stdenv.isLinux [ systemd.dev ];
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
wrapProgram $bin/bin/promtail \
--prefix LD_LIBRARY_PATH : "${systemd.lib}/lib"
'';
meta = with stdenv.lib; {
description = "Like Prometheus, but for logs";
license = licenses.asl20;
homepage = "https://grafana.com/oss/loki/";
maintainers = with maintainers; [ willibutz globin mmahut ];
platforms = platforms.unix;
};
}