···2, fetchFromGitHub
3, lib
4, stdenv
005}:
67buildGoModule rec {
8 pname = "opentelemetry-collector-contrib";
9- version = "0.66.0";
1011 src = fetchFromGitHub {
12 owner = "open-telemetry";
13 repo = "opentelemetry-collector-contrib";
14 rev = "v${version}";
15- sha256 = "sha256-FT5AoqCHNf2sdKyejALOsL/zHrrxP7vdntagR9vA00I=";
16 };
17 # proxy vendor to avoid hash missmatches between linux and macOS
18 proxyVendor = true;
19- vendorSha256 = "sha256-65bfTCMRJ8iL5ABGPqvkayw4zSn4KkCriEkWYa0Pe68=";
2021- subPackages = [ "cmd/otelcontribcol" ];
02223 # CGO_ENABLED=0 required for mac - "error: 'TARGET_OS_MAC' is not defined, evaluates to 0"
24 # https://github.com/shirou/gopsutil/issues/976
25 CGO_ENABLED = if stdenv.isLinux then 1 else 0;
000000000000002627 ldflags = [
28 "-s"
···2, fetchFromGitHub
3, lib
4, stdenv
5+, systemdMinimal
6+, withSystemd ? false
7}:
89buildGoModule rec {
10 pname = "opentelemetry-collector-contrib";
11+ version = "0.76.1";
1213 src = fetchFromGitHub {
14 owner = "open-telemetry";
15 repo = "opentelemetry-collector-contrib";
16 rev = "v${version}";
17+ sha256 = "sha256-Aeiq9IJReUxJUpeq5mSReK5foC5aY4fMSZli0ZUjYPc=";
18 };
19 # proxy vendor to avoid hash missmatches between linux and macOS
20 proxyVendor = true;
21+ vendorSha256 = "sha256-vLbx/qmSZuteuvChnyA/wcEcIjU3zWkxSjfk8VBdgU4=";
2223+ # there is a nested go.mod
24+ sourceRoot = "source/cmd/otelcontribcol";
2526 # CGO_ENABLED=0 required for mac - "error: 'TARGET_OS_MAC' is not defined, evaluates to 0"
27 # https://github.com/shirou/gopsutil/issues/976
28 CGO_ENABLED = if stdenv.isLinux then 1 else 0;
29+30+ # journalctl is required in-$PATH for the journald receiver tests.
31+ nativeCheckInputs = lib.optionals stdenv.isLinux [ systemdMinimal ];
32+33+ # We don't inject the package into propagatedBuildInputs unless
34+ # asked to avoid hard-requiring a large package. For the journald
35+ # receiver to work, journalctl will need to be available in-$PATH,
36+ # so expose this as an option for those who want more control over
37+ # it instead of trusting the global $PATH.
38+ propagatedBuildInputs = lib.optionals withSystemd [ systemdMinimal ];
39+40+ # This test fails on darwin for mysterious reasons.
41+ checkFlags = lib.optionals stdenv.isDarwin
42+ [ "-skip" "TestDefaultExtensions/memory_ballast" ];
4344 ldflags = [
45 "-s"