@@ -1,24 +1,29 @@
11{ buildGoModule
22, fetchFromGitHub
33, lib
4+, stdenv
45}:
56
67buildGoModule rec {
78 pname = "opentelemetry-collector-contrib";
8− version = "0.44.0";
9+ version = "0.45.1";
910
1011 src = fetchFromGitHub {
1112 owner = "open-telemetry";
1213 repo = "opentelemetry-collector-contrib";
1314 rev = "v${version}";
14− sha256 = "sha256-JRkS51ybFnvCn3pKhDeXO0R23wzT1uso1PtXZllF1fA=";
15+ sha256 = "sha256-HoDQK/WyvDQgYBr6WPJ+bZE3GTx74SGgSj1P6i8AfL0=";
1516 };
1617 # proxy vendor to avoid hash missmatches between linux and macOS
1718 proxyVendor = true;
18− vendorSha256 = "sha256-4MnUDakBfo3nhSqMjDYiqx6FNZvAB/9DE1yxOvmQAAk=";
19+ vendorSha256 = "sha256-e33EV1DGpR3XL70sjfCSMeuOSyh334+AkHnE+vqHrh0=";
1920
2021 subPackages = [ "cmd/otelcontribcol" ];
2122
23+ # 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;
26+
2227 ldflags = [
2328 "-s"
2429 "-w"