1 { lib, buildGoModule, fetchFromGitHub, getent, coreutils, nix-update-script, stdenv }:
7 src = fetchFromGitHub {
8 owner = "equinix-labs";
11 hash = "sha256-JYi9CbP4mUhX0zNjhi6QlBzLKcj2zdPwlyBSIYKp6vk=";
14 vendorHash = "sha256-fWQz7ZrU8gulhpOHSN8Prn4EMC0KXy942FZD/PMsLxc=";
17 ln -s $GOPATH/bin/otel-cli .
18 '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
19 substituteInPlace main_test.go \
20 --replace-fail 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`'
23 patches = [ ./patches/bin-echo-patch.patch ];
25 passthru.updateScript = nix-update-script {};
28 homepage = "https://github.com/equinix-labs/otel-cli";
29 description = "Command-line tool for sending OpenTelemetry traces";
30 changelog = "https://github.com/equinix-labs/otel-cli/releases/tag/v${version}";
31 license = licenses.asl20;
32 maintainers = with lib.maintainers; [ emattiza urandom ];
33 mainProgram = "otel-cli";