98eb3e9ef5
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "ocb";
|
|
version = "0.101.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "open-telemetry";
|
|
repo = "opentelemetry-collector";
|
|
rev = "cmd/builder/v${version}";
|
|
hash = "sha256-Ucp00OjyPtHA6so/NOzTLtPSuhXwz6A2708w2WIZb/E=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/cmd/builder";
|
|
vendorHash = "sha256-MTwD9xkrq3EudppLSoONgcPCBWlbSmaODLH9NtYgVOk=";
|
|
|
|
CGO_ENABLED = 0;
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X go.opentelemetry.io/collector/cmd/builder/internal.version=${version}"
|
|
];
|
|
|
|
# The TestGenerateAndCompile tests download new dependencies for a modified go.mod. Nix doesn't allow network access so skipping.
|
|
checkFlags = [ "-skip TestGenerateAndCompile" ];
|
|
|
|
# Rename the to ocb (it's generated as "builder")
|
|
postInstall = ''
|
|
mv $out/bin/builder $out/bin/ocb
|
|
'';
|
|
|
|
meta = {
|
|
description = "OpenTelemetry Collector";
|
|
homepage = "https://github.com/open-telemetry/opentelemetry-collector.git";
|
|
changelog = "https://github.com/open-telemetry/opentelemetry-collector/blob/${src.rev}/CHANGELOG.md";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ davsanchez ];
|
|
mainProgram = "ocb";
|
|
};
|
|
}
|