Merge pull request #101986 from mweinelt/loki2

grafana-loki: 1.6.1 -> 2.0.0
This commit is contained in:
Mario Rodas 2020-10-31 11:28:05 -05:00 committed by GitHub
commit 2faef82610
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 15 deletions

View file

@ -1,24 +1,28 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub, makeWrapper, systemd }:
{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, systemd, fetchpatch }:
buildGoPackage rec {
version = "1.6.1";
buildGoModule rec {
version = "2.0.0";
pname = "grafana-loki";
goPackagePath = "github.com/grafana/loki";
doCheck = true;
src = fetchFromGitHub {
rev = "v${version}";
owner = "grafana";
repo = "loki";
sha256 = "0bakskzizazc5cd6km3n6facc5val5567zinnxg3yjy29xdi64ww";
sha256 = "09a0mqdmk754vigd1xqijzwazwrmfaqcgdr2c6dz25p7a65568hj";
};
postPatch = ''
substituteInPlace pkg/distributor/distributor_test.go --replace \
'"eth0", "en0", "lo0"' \
'"lo"'
'';
vendorSha256 = null;
subPackages = [ "..." ];
patches = [
(fetchpatch {
# Fix expected return value in Test_validateDropConfig
# https://github.com/grafana/loki/issues/2519
url = "https://github.com/grafana/loki/commit/1316c0f0c5cda7c272c4873ea910211476fc1db8.patch";
sha256 = "06hwga58qpmivbhyjgyqzb75602hy8212a4b5vh99y9pnn6c913h";
})
];
nativeBuildInputs = [ makeWrapper ];
buildInputs = stdenv.lib.optionals stdenv.isLinux [ systemd.dev ];
@ -28,6 +32,8 @@ buildGoPackage rec {
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
'';
doCheck = true;
meta = with stdenv.lib; {
description = "Like Prometheus, but for logs";
license = licenses.asl20;

View file

@ -16656,9 +16656,7 @@ in
grafana = callPackage ../servers/monitoring/grafana { };
grafana-loki = callPackage ../servers/monitoring/loki {
buildGoPackage = buildGo114Package;
};
grafana-loki = callPackage ../servers/monitoring/loki { };
grafana_reporter = callPackage ../servers/monitoring/grafana-reporter { };