forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opentelemetry-collector-builder: init at 0.101.0 (NixOS#258467)
- Loading branch information
1 parent
48e631e
commit 72bbd58
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
pkgs/by-name/op/opentelemetry-collector-builder/package.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
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"; | ||
}; | ||
} |