mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 15:41:40 +00:00
39 lines
945 B
Nix
39 lines
945 B
Nix
{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, nixosTests, systemd
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
version = "2.1.0";
|
|
pname = "grafana-loki";
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "v${version}";
|
|
owner = "grafana";
|
|
repo = "loki";
|
|
sha256 = "O/3079a67j1i9pgf18SBx0iJcQPVmb0H+K/PzQVBCDQ=";
|
|
};
|
|
|
|
vendorSha256 = null;
|
|
|
|
subPackages = [ "..." ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = lib.optionals stdenv.isLinux [ systemd.dev ];
|
|
|
|
preFixup = lib.optionalString stdenv.isLinux ''
|
|
wrapProgram $out/bin/promtail \
|
|
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) loki; };
|
|
|
|
doCheck = true;
|
|
|
|
meta = with 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;
|
|
};
|
|
}
|