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
, buildGoModule
, fetchFromGitHub
, makeWrapper
, nixosTests
, systemd
, testers
, grafana-loki
{
stdenv,
lib,
buildGoModule,
fetchFromGitHub,
makeWrapper,
nixosTests,
systemd,
testers,
grafana-loki,
}:
buildGoModule rec {
@ -31,7 +32,7 @@ buildGoModule rec {
"cmd/lokitool"
];
tags = ["promtail_journal_enabled"];
tags = [ "promtail_journal_enabled" ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemd.dev ];
@ -49,22 +50,34 @@ buildGoModule rec {
};
};
ldflags = let t = "github.com/grafana/loki/v3/pkg/util/build"; in [
"-s"
"-w"
"-X ${t}.Version=${version}"
"-X ${t}.BuildUser=nix@nixpkgs"
"-X ${t}.BuildDate=unknown"
"-X ${t}.Branch=unknown"
"-X ${t}.Revision=unknown"
];
ldflags =
let
t = "github.com/grafana/loki/v3/pkg/util/build";
in
[
"-s"
"-w"
"-X ${t}.Version=${version}"
"-X ${t}.BuildUser=nix@nixpkgs"
"-X ${t}.BuildDate=unknown"
"-X ${t}.Branch=unknown"
"-X ${t}.Revision=unknown"
];
meta = with lib; {
description = "Like Prometheus, but for logs";
mainProgram = "promtail";
license = with licenses; [ agpl3Only asl20 ];
license = with licenses; [
agpl3Only
asl20
];
homepage = "https://grafana.com/oss/loki/";
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 { };
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-cli = callPackage ../servers/hasura/cli.nix { };