Skip to content

Commit 6d0e5ae

Browse files
grafana-loki: 3.4.0 -> 3.4.2 (#382699)
2 parents 31b8b24 + 80b1f28 commit 6d0e5ae

File tree

4 files changed

+88
-73
lines changed

4 files changed

+88
-73
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
stdenv,
3+
lib,
4+
buildGoModule,
5+
fetchFromGitHub,
6+
makeWrapper,
7+
nix-update-script,
8+
nixosTests,
9+
systemd,
10+
testers,
11+
grafana-loki,
12+
}:
13+
14+
buildGoModule rec {
15+
version = "3.4.2";
16+
pname = "grafana-loki";
17+
18+
src = fetchFromGitHub {
19+
owner = "grafana";
20+
repo = "loki";
21+
rev = "v${version}";
22+
hash = "sha256-GE92NlFCOk6qFtrgeBvLDI0OkmWaJ1j07Q14+jgi9+w=";
23+
};
24+
25+
vendorHash = null;
26+
27+
subPackages = [
28+
# TODO split every executable into its own package
29+
"cmd/loki"
30+
"cmd/loki-canary"
31+
"clients/cmd/promtail"
32+
"cmd/logcli"
33+
"cmd/lokitool"
34+
];
35+
36+
tags = [ "promtail_journal_enabled" ];
37+
38+
nativeBuildInputs = [ makeWrapper ];
39+
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemd.dev ];
40+
41+
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
42+
wrapProgram $out/bin/promtail \
43+
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
44+
'';
45+
46+
passthru = {
47+
tests = {
48+
inherit (nixosTests) loki;
49+
version = testers.testVersion {
50+
command = "loki --version";
51+
package = grafana-loki;
52+
};
53+
};
54+
55+
updateScript = nix-update-script { };
56+
};
57+
58+
ldflags =
59+
let
60+
t = "github.com/grafana/loki/v3/pkg/util/build";
61+
in
62+
[
63+
"-s"
64+
"-w"
65+
"-X ${t}.Version=${version}"
66+
"-X ${t}.BuildUser=nix@nixpkgs"
67+
"-X ${t}.BuildDate=unknown"
68+
"-X ${t}.Branch=unknown"
69+
"-X ${t}.Revision=unknown"
70+
];
71+
72+
meta = with lib; {
73+
description = "Like Prometheus, but for logs";
74+
mainProgram = "promtail";
75+
license = with licenses; [
76+
agpl3Only
77+
asl20
78+
];
79+
homepage = "https://grafana.com/oss/loki/";
80+
changelog = "https://github.com/grafana/loki/releases/tag/v${version}";
81+
maintainers = with maintainers; [
82+
willibutz
83+
globin
84+
mmahut
85+
emilylange
86+
];
87+
};
88+
}
File renamed without changes.

pkgs/servers/monitoring/loki/default.nix

Lines changed: 0 additions & 70 deletions
This file was deleted.

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11263,9 +11263,6 @@ with pkgs;
1126311263
grafana = callPackage ../servers/monitoring/grafana { };
1126411264
grafanaPlugins = callPackages ../servers/monitoring/grafana/plugins { };
1126511265

11266-
grafana-loki = callPackage ../servers/monitoring/loki { };
11267-
promtail = callPackage ../servers/monitoring/loki/promtail.nix { };
11268-
1126911266
hasura-graphql-engine = haskell.lib.compose.justStaticExecutables haskell.packages.ghc810.graphql-engine;
1127011267

1127111268
hasura-cli = callPackage ../servers/hasura/cli.nix { };

0 commit comments

Comments
 (0)