mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
globalping-cli: init at 1.1.0
This commit is contained in:
parent
195110917e
commit
9667203910
38
pkgs/tools/networking/globalping-cli/default.nix
Normal file
38
pkgs/tools/networking/globalping-cli/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, nix-update-script }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "globalping-cli";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jsdelivr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-UY+SAmkE8h/K92Em5iikcMiNixkqnDVkhlrKVq1ZkVM=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-fUB7WIEAPBot8A2f7WQ5wUDtCrOydZd4nd4qDuy1vzg=";
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
@ -2331,6 +2331,8 @@ with pkgs;
|
||||
|
||||
glitter = callPackage ../applications/version-management/glitter { };
|
||||
|
||||
globalping-cli = callPackage ../tools/networking/globalping-cli { };
|
||||
|
||||
gst = callPackage ../applications/version-management/gst { };
|
||||
|
||||
gut = callPackage ../applications/version-management/gut { };
|
||||
|
Loading…
Reference in New Issue
Block a user