{ lib , stdenv , rustPlatform , fetchFromGitHub , installShellFiles , libiconv , Security , iputils }: rustPlatform.buildRustPackage rec { pname = "gping"; version = "1.17.3"; src = fetchFromGitHub { owner = "orf"; repo = "gping"; rev = "gping-v${version}"; hash = "sha256-DJ+5WoizFF3K9drFc955bDMXnlW+okYrZos/+dRVtjw="; }; cargoHash = "sha256-pQ95sS2dGVzZUOyuUpJPamW7RLiUTGu9KgpWLg4wn/w="; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ]; nativeBuildInputs = [ installShellFiles ]; nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ iputils ]; postInstall = '' installManPage gping.1 ''; doInstallCheck = true; installCheckPhase = '' $out/bin/gping --version | grep "${version}" ''; meta = with lib; { description = "Ping, but with a graph"; homepage = "https://github.com/orf/gping"; changelog = "https://github.com/orf/gping/releases/tag/gping-v${version}"; license = licenses.mit; maintainers = with maintainers; [ cafkafk ]; mainProgram = "gping"; }; }