1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/servers/monitoring/loki/default.nix
WilliButz 96de24cfdb
grafana-loki: 1.2.0 -> 1.3.0, patch distributor test
Only include the loopback interface "lo" in the lifecycler configuration
of the distributor test.
2020-01-22 23:44:32 +01:00

39 lines
1 KiB
Nix

{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, systemd }:
buildGoPackage rec {
version = "1.3.0";
pname = "grafana-loki";
goPackagePath = "github.com/grafana/loki";
doCheck = true;
src = fetchFromGitHub {
rev = "v${version}";
owner = "grafana";
repo = "loki";
sha256 = "0b1dpb3vh5i18467qk8kpb5ic14p4p1dfyr8hjkznf6bs7g8ka1q";
};
postPatch = ''
substituteInPlace pkg/distributor/distributor_test.go --replace \
'"eth0", "en0", "lo0"' \
'"lo"'
'';
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;
};
}