depot/third_party/nixpkgs/pkgs/tools/networking/gping/default.nix
Default email 8e65f7f0cc Project import generated by Copybara.
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
2022-03-05 17:20:37 +01:00

35 lines
766 B
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, libiconv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "gping";
version = "1.3.0";
src = fetchFromGitHub {
owner = "orf";
repo = "gping";
rev = "gping-v${version}";
sha256 = "sha256-Q7M/vDhECEIQ8s8qt1U7wESqv+Im79TyZ6s2vqjU5ps=";
};
cargoSha256 = "sha256-cnmjfvMqq8VDMvjFPnjmmH57Gaqttk36AwEtuuAT6qU=";
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
doInstallCheck = true;
installCheckPhase = ''
$out/bin/gping --version | grep "${version}"
'';
meta = with lib; {
description = "Ping, but with a graph";
homepage = "https://github.com/orf/gping";
license = licenses.mit;
maintainers = with maintainers; [ andrew-d ];
};
}