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

39 lines
945 B
Nix
Raw Normal View History

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