mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
Merge pull request #301236 from emattiza/update/otel-cli-0-4-5
otel-cli: 0.4.4 -> 0.4.5
This commit is contained in:
commit
d31958cb39
@ -2,24 +2,26 @@
|
|||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "otel-cli";
|
pname = "otel-cli";
|
||||||
version = "0.4.4";
|
version = "0.4.5";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "equinix-labs";
|
owner = "equinix-labs";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-XVhnDtt2FhYgfGWDPFkneZTboeHGaIbiF5YdHoqB8N8=";
|
hash = "sha256-JYi9CbP4mUhX0zNjhi6QlBzLKcj2zdPwlyBSIYKp6vk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-HwbEqWtOqiTe5Z/MtMAs63Lzvll/vgmbCpMTREXgtXA=";
|
vendorHash = "sha256-fWQz7ZrU8gulhpOHSN8Prn4EMC0KXy942FZD/PMsLxc=";
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
ln -s $GOPATH/bin/otel-cli .
|
ln -s $GOPATH/bin/otel-cli .
|
||||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||||
substituteInPlace main_test.go \
|
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 {};
|
passthru.updateScript = nix-update-script {};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
21
pkgs/tools/misc/otel-cli/patches/bin-echo-patch.patch
Normal file
21
pkgs/tools/misc/otel-cli/patches/bin-echo-patch.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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…
Reference in New Issue
Block a user