nixpkgs/pkgs/tools/networking/globalping-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.1 KiB
Nix
Raw Normal View History

2023-07-30 15:39:31 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, nix-update-script }:
buildGoModule rec {
pname = "globalping-cli";
2024-01-22 13:46:18 +00:00
version = "1.1.6";
2023-07-30 15:39:31 +00:00
src = fetchFromGitHub {
owner = "jsdelivr";
repo = pname;
rev = "v${version}";
2024-01-22 13:46:18 +00:00
hash = "sha256-bPHS980iByWEBiqs4CEoI8SdlI4vaqGhyIRrXUUtVOo=";
2023-07-30 15:39:31 +00:00
};
2024-01-22 13:46:18 +00:00
vendorHash = "sha256-PiSFDA6mZNDe6BhmKxAGuXsBZ+3aBFJ/gBwY/a6Z5gE=";
2023-07-30 15:39:31 +00:00
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = 0;
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
postInstall = ''
mv $out/bin/${pname} $out/bin/globalping
installShellCompletion --cmd globalping \
--bash <($out/bin/globalping completion bash) \
--fish <($out/bin/globalping completion fish) \
--zsh <($out/bin/globalping completion zsh)
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "A simple CLI tool to run networking commands remotely from hundreds of globally distributed servers";
homepage = "https://www.jsdelivr.com/globalping/cli";
license = licenses.mpl20;
maintainers = with maintainers; [ xyenon ];
mainProgram = "globalping";
};
}