grafana-loki, promtail: move to by-name

This commit is contained in:
Adam C. Stephens 2025-02-16 19:24:58 -05:00
parent efbd3b03d2
commit 1146c444a9
No known key found for this signature in database
3 changed files with 34 additions and 24 deletions

View file

@ -1,12 +1,13 @@
{ stdenv {
, lib stdenv,
, buildGoModule lib,
, fetchFromGitHub buildGoModule,
, makeWrapper fetchFromGitHub,
, nixosTests makeWrapper,
, systemd nixosTests,
, testers systemd,
, grafana-loki testers,
grafana-loki,
}: }:
buildGoModule rec { buildGoModule rec {
@ -31,7 +32,7 @@ buildGoModule rec {
"cmd/lokitool" "cmd/lokitool"
]; ];
tags = ["promtail_journal_enabled"]; tags = [ "promtail_journal_enabled" ];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemd.dev ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemd.dev ];
@ -49,7 +50,11 @@ buildGoModule rec {
}; };
}; };
ldflags = let t = "github.com/grafana/loki/v3/pkg/util/build"; in [ ldflags =
let
t = "github.com/grafana/loki/v3/pkg/util/build";
in
[
"-s" "-s"
"-w" "-w"
"-X ${t}.Version=${version}" "-X ${t}.Version=${version}"
@ -62,9 +67,17 @@ buildGoModule rec {
meta = with lib; { meta = with lib; {
description = "Like Prometheus, but for logs"; description = "Like Prometheus, but for logs";
mainProgram = "promtail"; mainProgram = "promtail";
license = with licenses; [ agpl3Only asl20 ]; license = with licenses; [
agpl3Only
asl20
];
homepage = "https://grafana.com/oss/loki/"; homepage = "https://grafana.com/oss/loki/";
changelog = "https://github.com/grafana/loki/releases/tag/v${version}"; changelog = "https://github.com/grafana/loki/releases/tag/v${version}";
maintainers = with maintainers; [ willibutz globin mmahut emilylange ]; maintainers = with maintainers; [
willibutz
globin
mmahut
emilylange
];
}; };
} }

View file

@ -11261,9 +11261,6 @@ with pkgs;
grafana = callPackage ../servers/monitoring/grafana { }; grafana = callPackage ../servers/monitoring/grafana { };
grafanaPlugins = callPackages ../servers/monitoring/grafana/plugins { }; grafanaPlugins = callPackages ../servers/monitoring/grafana/plugins { };
grafana-loki = callPackage ../servers/monitoring/loki { };
promtail = callPackage ../servers/monitoring/loki/promtail.nix { };
hasura-graphql-engine = haskell.lib.compose.justStaticExecutables haskell.packages.ghc810.graphql-engine; hasura-graphql-engine = haskell.lib.compose.justStaticExecutables haskell.packages.ghc810.graphql-engine;
hasura-cli = callPackage ../servers/hasura/cli.nix { }; hasura-cli = callPackage ../servers/hasura/cli.nix { };