nixpkgs/pkgs/servers/monitoring/loki/default.nix

39 lines
945 B
Nix
Raw Normal View History

2020-12-25 06:33:39 +03:00
{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, nixosTests, systemd
2020-11-10 12:46:30 +03:00
}:
2019-03-01 10:18:57 +03:00
buildGoModule rec {
2020-12-25 06:33:39 +03:00
version = "2.1.0";
pname = "grafana-loki";
2019-03-01 10:18:57 +03:00
src = fetchFromGitHub {
rev = "v${version}";
owner = "grafana";
repo = "loki";
2020-12-25 06:33:39 +03:00
sha256 = "O/3079a67j1i9pgf18SBx0iJcQPVmb0H+K/PzQVBCDQ=";
2019-03-01 10:18:57 +03:00
};
vendorSha256 = null;
subPackages = [ "..." ];
2019-08-03 01:19:14 +03:00
nativeBuildInputs = [ makeWrapper ];
2021-01-15 10:07:56 +03:00
buildInputs = lib.optionals stdenv.isLinux [ systemd.dev ];
2019-08-03 01:19:14 +03:00
2021-01-15 10:07:56 +03:00
preFixup = lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/promtail \
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
2019-08-03 01:19:14 +03:00
'';
2020-11-10 12:46:30 +03:00
passthru.tests = { inherit (nixosTests) loki; };
doCheck = true;
meta = with lib; {
description = "Like Prometheus, but for logs";
2019-03-01 10:18:57 +03:00
license = licenses.asl20;
2019-12-15 06:22:22 +03:00
homepage = "https://grafana.com/oss/loki/";
maintainers = with maintainers; [ willibutz globin mmahut ];
2019-12-15 06:22:22 +03:00
platforms = platforms.unix;
2019-03-01 10:18:57 +03:00
};
}