diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-02-02 12:01:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 12:01:33 +0000 |
commit | fffb187b8ebea382b02a70d20dee945fbadd3359 (patch) | |
tree | 910d6bc257e553c0dd2eabf1c263de6d9b7ed7fd /pkgs/servers/monitoring | |
parent | f9b171789ead238acb23aa07e2b535f059a5e32c (diff) | |
parent | dc109a3192fe7fd8c3c4c447cdbf50d5a518271f (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/servers/monitoring')
-rw-r--r-- | pkgs/servers/monitoring/grafana-agent/default.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/servers/monitoring/grafana-agent/default.nix b/pkgs/servers/monitoring/grafana-agent/default.nix index bf1bc6fa34d6d..ac778cd6d506c 100644 --- a/pkgs/servers/monitoring/grafana-agent/default.nix +++ b/pkgs/servers/monitoring/grafana-agent/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, systemd, nixosTests }: +{ lib, stdenv, buildGoModule, fetchFromGitHub, systemd, nixosTests }: buildGoModule rec { pname = "grafana-agent"; @@ -38,7 +38,7 @@ buildGoModule rec { # uses go-systemd, which uses libsystemd headers # https://github.com/coreos/go-systemd/issues/351 - NIX_CFLAGS_COMPILE = [ "-I${lib.getDev systemd}/include" ]; + NIX_CFLAGS_COMPILE = lib.optionals stdenv.isLinux [ "-I${lib.getDev systemd}/include" ]; # tries to access /sys: https://github.com/grafana/agent/issues/333 preBuild = '' @@ -48,7 +48,7 @@ buildGoModule rec { # go-systemd uses libsystemd under the hood, which does dlopen(libsystemd) at # runtime. # Add to RUNPATH so it can be found. - postFixup = '' + postFixup = lib.optionalString stdenv.isLinux '' patchelf \ --set-rpath "${lib.makeLibraryPath [ (lib.getLib systemd) ]}:$(patchelf --print-rpath $out/bin/agent)" \ $out/bin/agent @@ -61,6 +61,5 @@ buildGoModule rec { license = licenses.asl20; homepage = "https://grafana.com/products/cloud"; maintainers = with maintainers; [ flokli ]; - platforms = platforms.linux; }; } |