···22, fetchFromGitHub
33, lib
44, stdenv
55+, systemdMinimal
66+, withSystemd ? false
57}:
6879buildGoModule rec {
810 pname = "opentelemetry-collector-contrib";
99- version = "0.66.0";
1111+ version = "0.76.1";
10121113 src = fetchFromGitHub {
1214 owner = "open-telemetry";
1315 repo = "opentelemetry-collector-contrib";
1416 rev = "v${version}";
1515- sha256 = "sha256-FT5AoqCHNf2sdKyejALOsL/zHrrxP7vdntagR9vA00I=";
1717+ sha256 = "sha256-Aeiq9IJReUxJUpeq5mSReK5foC5aY4fMSZli0ZUjYPc=";
1618 };
1719 # proxy vendor to avoid hash missmatches between linux and macOS
1820 proxyVendor = true;
1919- vendorSha256 = "sha256-65bfTCMRJ8iL5ABGPqvkayw4zSn4KkCriEkWYa0Pe68=";
2121+ vendorSha256 = "sha256-vLbx/qmSZuteuvChnyA/wcEcIjU3zWkxSjfk8VBdgU4=";
20222121- subPackages = [ "cmd/otelcontribcol" ];
2323+ # there is a nested go.mod
2424+ sourceRoot = "source/cmd/otelcontribcol";
22252326 # CGO_ENABLED=0 required for mac - "error: 'TARGET_OS_MAC' is not defined, evaluates to 0"
2427 # https://github.com/shirou/gopsutil/issues/976
2528 CGO_ENABLED = if stdenv.isLinux then 1 else 0;
2929+3030+ # journalctl is required in-$PATH for the journald receiver tests.
3131+ nativeCheckInputs = lib.optionals stdenv.isLinux [ systemdMinimal ];
3232+3333+ # We don't inject the package into propagatedBuildInputs unless
3434+ # asked to avoid hard-requiring a large package. For the journald
3535+ # receiver to work, journalctl will need to be available in-$PATH,
3636+ # so expose this as an option for those who want more control over
3737+ # it instead of trusting the global $PATH.
3838+ propagatedBuildInputs = lib.optionals withSystemd [ systemdMinimal ];
3939+4040+ # This test fails on darwin for mysterious reasons.
4141+ checkFlags = lib.optionals stdenv.isDarwin
4242+ [ "-skip" "TestDefaultExtensions/memory_ballast" ];
26432744 ldflags = [
2845 "-s"