grafana-loki: 1.6.1 -> 2.0.0
Convert to use buildGoModule and add a patch for a test failing on golang>=1.15.
This commit is contained in:
parent
c29ded49b1
commit
09bbd4017f
|
@ -1,24 +1,28 @@
|
||||||
{ stdenv, lib, buildGoPackage, fetchFromGitHub, makeWrapper, systemd }:
|
{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, systemd, fetchpatch }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoModule rec {
|
||||||
version = "1.6.1";
|
version = "2.0.0";
|
||||||
pname = "grafana-loki";
|
pname = "grafana-loki";
|
||||||
goPackagePath = "github.com/grafana/loki";
|
|
||||||
|
|
||||||
doCheck = true;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
owner = "grafana";
|
owner = "grafana";
|
||||||
repo = "loki";
|
repo = "loki";
|
||||||
sha256 = "0bakskzizazc5cd6km3n6facc5val5567zinnxg3yjy29xdi64ww";
|
sha256 = "09a0mqdmk754vigd1xqijzwazwrmfaqcgdr2c6dz25p7a65568hj";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
vendorSha256 = null;
|
||||||
substituteInPlace pkg/distributor/distributor_test.go --replace \
|
|
||||||
'"eth0", "en0", "lo0"' \
|
subPackages = [ "..." ];
|
||||||
'"lo"'
|
|
||||||
'';
|
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 ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = stdenv.lib.optionals stdenv.isLinux [ systemd.dev ];
|
buildInputs = stdenv.lib.optionals stdenv.isLinux [ systemd.dev ];
|
||||||
|
@ -28,6 +32,8 @@ buildGoPackage rec {
|
||||||
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
|
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Like Prometheus, but for logs";
|
description = "Like Prometheus, but for logs";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
|
|
|
@ -16565,9 +16565,7 @@ in
|
||||||
|
|
||||||
grafana = callPackage ../servers/monitoring/grafana { };
|
grafana = callPackage ../servers/monitoring/grafana { };
|
||||||
|
|
||||||
grafana-loki = callPackage ../servers/monitoring/loki {
|
grafana-loki = callPackage ../servers/monitoring/loki { };
|
||||||
buildGoPackage = buildGo114Package;
|
|
||||||
};
|
|
||||||
|
|
||||||
grafana_reporter = callPackage ../servers/monitoring/grafana-reporter { };
|
grafana_reporter = callPackage ../servers/monitoring/grafana-reporter { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue