nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 51 lines 1.2 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 getent, 6 coreutils, 7 nix-update-script, 8 stdenv, 9}: 10 11buildGoModule rec { 12 pname = "otel-cli"; 13 version = "0.4.5"; 14 15 src = fetchFromGitHub { 16 owner = "equinix-labs"; 17 repo = "otel-cli"; 18 rev = "v${version}"; 19 hash = "sha256-JYi9CbP4mUhX0zNjhi6QlBzLKcj2zdPwlyBSIYKp6vk="; 20 }; 21 22 vendorHash = "sha256-fWQz7ZrU8gulhpOHSN8Prn4EMC0KXy942FZD/PMsLxc="; 23 24 preCheck = '' 25 ln -s $GOPATH/bin/otel-cli . 26 '' 27 + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' 28 substituteInPlace main_test.go \ 29 --replace-fail 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${ 30 lib.makeBinPath [ 31 getent 32 coreutils 33 ] 34 }`' 35 ''; 36 37 patches = [ ./patches/bin-echo-patch.patch ]; 38 39 passthru.updateScript = nix-update-script { }; 40 41 meta = { 42 homepage = "https://github.com/equinix-labs/otel-cli"; 43 description = "Command-line tool for sending OpenTelemetry traces"; 44 changelog = "https://github.com/equinix-labs/otel-cli/releases/tag/v${version}"; 45 license = lib.licenses.asl20; 46 maintainers = with lib.maintainers; [ 47 emattiza 48 ]; 49 mainProgram = "otel-cli"; 50 }; 51}