Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at github-to-sqlite-beautifulsoup4 38 lines 1.2 kB view raw
1{ lib, buildGoModule, fetchFromGitHub, installShellFiles, nix-update-script }: 2 3buildGoModule rec { 4 pname = "globalping-cli"; 5 version = "1.1.0"; 6 7 src = fetchFromGitHub { 8 owner = "jsdelivr"; 9 repo = pname; 10 rev = "v${version}"; 11 hash = "sha256-UY+SAmkE8h/K92Em5iikcMiNixkqnDVkhlrKVq1ZkVM="; 12 }; 13 14 vendorHash = "sha256-fUB7WIEAPBot8A2f7WQ5wUDtCrOydZd4nd4qDuy1vzg="; 15 16 nativeBuildInputs = [ installShellFiles ]; 17 18 CGO_ENABLED = 0; 19 ldflags = [ "-s" "-w" "-X main.version=${version}" ]; 20 21 postInstall = '' 22 mv $out/bin/${pname} $out/bin/globalping 23 installShellCompletion --cmd globalping \ 24 --bash <($out/bin/globalping completion bash) \ 25 --fish <($out/bin/globalping completion fish) \ 26 --zsh <($out/bin/globalping completion zsh) 27 ''; 28 29 passthru.updateScript = nix-update-script { }; 30 31 meta = with lib; { 32 description = "A simple CLI tool to run networking commands remotely from hundreds of globally distributed servers"; 33 homepage = "https://www.jsdelivr.com/globalping/cli"; 34 license = licenses.mpl20; 35 maintainers = with maintainers; [ xyenon ]; 36 mainProgram = "globalping"; 37 }; 38}