2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, stdenv
|
2020-11-19 00:13:47 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2023-08-04 22:07:22 +00:00
|
|
|
, installShellFiles
|
2021-05-20 23:08:51 +00:00
|
|
|
, libiconv
|
2022-02-10 20:34:41 +00:00
|
|
|
, Security
|
2023-07-15 17:15:38 +00:00
|
|
|
, iputils
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gping";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.16.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "orf";
|
|
|
|
repo = "gping";
|
2021-10-28 06:52:43 +00:00
|
|
|
rev = "gping-v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-hCqjbJt0dHuvFsWEF/WgLEPY2xws71wFGdhzThYOOvA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-3jpQ8ANg9WYK1Q5Hph6fK442e5f9dsLQbTMBEwTaENc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeCheckInputs = lib.optionals stdenv.isLinux [ iputils ];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage gping.1
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/gping --version | grep "${version}"
|
|
|
|
'';
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Ping, but with a graph";
|
|
|
|
homepage = "https://github.com/orf/gping";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/orf/gping/releases/tag/gping-v${version}";
|
2020-11-19 00:13:47 +00:00
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ cafkafk ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "gping";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|