traefik: add djds as maintainer (#377217)
[NixPkgs.git] / pkgs / by-name / ot / otel-cli / package.nix
bloba3550e94225b17fbefde26ff899d5e31f505e551
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   getent,
6   coreutils,
7   nix-update-script,
8   stdenv,
9 }:
11 buildGoModule rec {
12   pname = "otel-cli";
13   version = "0.4.5";
15   src = fetchFromGitHub {
16     owner = "equinix-labs";
17     repo = pname;
18     rev = "v${version}";
19     hash = "sha256-JYi9CbP4mUhX0zNjhi6QlBzLKcj2zdPwlyBSIYKp6vk=";
20   };
22   vendorHash = "sha256-fWQz7ZrU8gulhpOHSN8Prn4EMC0KXy942FZD/PMsLxc=";
24   preCheck =
25     ''
26       ln -s $GOPATH/bin/otel-cli .
27     ''
28     + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
29       substituteInPlace main_test.go \
30         --replace-fail 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${
31           lib.makeBinPath [
32             getent
33             coreutils
34           ]
35         }`'
36     '';
38   patches = [ ./patches/bin-echo-patch.patch ];
40   passthru.updateScript = nix-update-script { };
42   meta = with lib; {
43     homepage = "https://github.com/equinix-labs/otel-cli";
44     description = "Command-line tool for sending OpenTelemetry traces";
45     changelog = "https://github.com/equinix-labs/otel-cli/releases/tag/v${version}";
46     license = licenses.asl20;
47     maintainers = with lib.maintainers; [
48       emattiza
49       urandom
50     ];
51     mainProgram = "otel-cli";
52   };