Loading pkgs/tools/misc/otel-cli/default.nix +6 −4 Original line number Diff line number Diff line Loading @@ -2,24 +2,26 @@ buildGoModule rec { pname = "otel-cli"; version = "0.4.4"; version = "0.4.5"; src = fetchFromGitHub { owner = "equinix-labs"; repo = pname; rev = "v${version}"; hash = "sha256-XVhnDtt2FhYgfGWDPFkneZTboeHGaIbiF5YdHoqB8N8="; hash = "sha256-JYi9CbP4mUhX0zNjhi6QlBzLKcj2zdPwlyBSIYKp6vk="; }; vendorHash = "sha256-HwbEqWtOqiTe5Z/MtMAs63Lzvll/vgmbCpMTREXgtXA="; vendorHash = "sha256-fWQz7ZrU8gulhpOHSN8Prn4EMC0KXy942FZD/PMsLxc="; preCheck = '' ln -s $GOPATH/bin/otel-cli . '' + lib.optionalString (!stdenv.isDarwin) '' substituteInPlace main_test.go \ --replace 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`' --replace-fail 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`' ''; patches = [ ./patches/bin-echo-patch.patch ]; passthru.updateScript = nix-update-script {}; meta = with lib; { Loading pkgs/tools/misc/otel-cli/patches/bin-echo-patch.patch 0 → 100644 +21 −0 Original line number Diff line number Diff line diff --git a/data_for_test.go b/data_for_test.go index c0b8980..691e270 100644 --- a/data_for_test.go +++ b/data_for_test.go @@ -555,14 +555,14 @@ var suites = []FixtureSuite{ "--endpoint", "{{endpoint}}", "--verbose", "--fail", "--attrs", "zy=ab", // ensure CLI args still propagate - "--", "/bin/echo", "a", "z", + "--", "echo", "a", "z", }, }, Expect: Results{ SpanCount: 1, CliOutput: "a z\n", SpanData: map[string]string{ - "attributes": "/^process.command=/bin/echo,process.command_args=/bin/echo,a,z,process.owner=\\w+,process.parent_pid=\\d+,process.pid=\\d+,zy=ab/", + "attributes": "/^process.command=echo,process.command_args=echo,a,z,process.owner=\\w+,process.parent_pid=\\d+,process.pid=\\d+,zy=ab/", }, }, }, Loading
pkgs/tools/misc/otel-cli/default.nix +6 −4 Original line number Diff line number Diff line Loading @@ -2,24 +2,26 @@ buildGoModule rec { pname = "otel-cli"; version = "0.4.4"; version = "0.4.5"; src = fetchFromGitHub { owner = "equinix-labs"; repo = pname; rev = "v${version}"; hash = "sha256-XVhnDtt2FhYgfGWDPFkneZTboeHGaIbiF5YdHoqB8N8="; hash = "sha256-JYi9CbP4mUhX0zNjhi6QlBzLKcj2zdPwlyBSIYKp6vk="; }; vendorHash = "sha256-HwbEqWtOqiTe5Z/MtMAs63Lzvll/vgmbCpMTREXgtXA="; vendorHash = "sha256-fWQz7ZrU8gulhpOHSN8Prn4EMC0KXy942FZD/PMsLxc="; preCheck = '' ln -s $GOPATH/bin/otel-cli . '' + lib.optionalString (!stdenv.isDarwin) '' substituteInPlace main_test.go \ --replace 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`' --replace-fail 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`' ''; patches = [ ./patches/bin-echo-patch.patch ]; passthru.updateScript = nix-update-script {}; meta = with lib; { Loading
pkgs/tools/misc/otel-cli/patches/bin-echo-patch.patch 0 → 100644 +21 −0 Original line number Diff line number Diff line diff --git a/data_for_test.go b/data_for_test.go index c0b8980..691e270 100644 --- a/data_for_test.go +++ b/data_for_test.go @@ -555,14 +555,14 @@ var suites = []FixtureSuite{ "--endpoint", "{{endpoint}}", "--verbose", "--fail", "--attrs", "zy=ab", // ensure CLI args still propagate - "--", "/bin/echo", "a", "z", + "--", "echo", "a", "z", }, }, Expect: Results{ SpanCount: 1, CliOutput: "a z\n", SpanData: map[string]string{ - "attributes": "/^process.command=/bin/echo,process.command_args=/bin/echo,a,z,process.owner=\\w+,process.parent_pid=\\d+,process.pid=\\d+,zy=ab/", + "attributes": "/^process.command=echo,process.command_args=echo,a,z,process.owner=\\w+,process.parent_pid=\\d+,process.pid=\\d+,zy=ab/", }, }, },