1 { lib, buildGoModule, fetchFromGitHub, installShellFiles, nix-update-script }:
4 pname = "globalping-cli";
7 src = fetchFromGitHub {
11 hash = "sha256-pViqoycOh1RfSqaAEST6m1v3mEcTX76dbL80bCp5aKo=";
14 vendorHash = "sha256-V6DwV2KukFfFK0PK9MacoHH0sB5qNV315jn0T+4rhfA=";
16 nativeBuildInputs = [ installShellFiles ];
19 ldflags = [ "-s" "-w" "-X main.version=${version}" ];
28 # Skip tests that require network access
30 "Test_TokenIntrospection"
34 "Test_CreateMeasurement"
38 [ "-skip=^${builtins.concatStringsSep "|^" skippedTests}" ];
41 mv $out/bin/${pname} $out/bin/globalping
42 installShellCompletion --cmd globalping \
43 --bash <($out/bin/globalping completion bash) \
44 --fish <($out/bin/globalping completion fish) \
45 --zsh <($out/bin/globalping completion zsh)
48 passthru.updateScript = nix-update-script { };
51 description = "Simple CLI tool to run networking commands remotely from hundreds of globally distributed servers";
52 homepage = "https://www.jsdelivr.com/globalping/cli";
53 license = licenses.mpl20;
54 maintainers = with maintainers; [ xyenon ];
55 mainProgram = "globalping";