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";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.15.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}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-22Nio6yfkL9HWNrI+kk5dGfojTtB/h0sizCWH9w9so8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cargoHash = "sha256-YfvcCnFXDoZXp/Aug0jVQkilsvSzS+JF90U0QvVFksE=";
|
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;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ andrew-d ];
|
|
|
|
};
|
|
|
|
}
|