2019-06-16 19:59:06 +00:00
|
|
|
{ lib
|
2021-05-15 21:01:12 +00:00
|
|
|
, stdenv
|
2020-11-14 03:01:32 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2023-08-01 21:25:46 +00:00
|
|
|
, installShellFiles
|
2021-05-15 21:01:12 +00:00
|
|
|
, libiconv
|
2022-02-07 08:56:32 +00:00
|
|
|
, Security
|
2023-07-01 13:39:58 +00:00
|
|
|
, iputils
|
2018-12-25 20:13:44 +00:00
|
|
|
}:
|
|
|
|
|
2020-11-14 03:01:32 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2018-12-25 20:13:44 +00:00
|
|
|
pname = "gping";
|
2023-08-01 21:25:23 +00:00
|
|
|
version = "1.14.0";
|
2018-12-25 20:13:44 +00:00
|
|
|
|
2020-11-14 03:01:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "orf";
|
|
|
|
repo = "gping";
|
2021-10-27 12:53:43 +00:00
|
|
|
rev = "gping-v${version}";
|
2023-08-01 21:25:23 +00:00
|
|
|
hash = "sha256-ReP+s2p0X39LVvl3/QF7fsYkU+OvsQyMhyuH8v4HuVU=";
|
2018-12-25 20:13:44 +00:00
|
|
|
};
|
|
|
|
|
2023-08-01 21:25:23 +00:00
|
|
|
cargoHash = "sha256-FTiNxCoEe/iMz68F1CpJHypgrhn4WwwWowuN9I1rl6E=";
|
2018-12-25 20:13:44 +00:00
|
|
|
|
2022-02-07 08:56:32 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2021-05-15 21:01:12 +00:00
|
|
|
|
2023-08-01 21:25:46 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2023-07-06 01:45:40 +00:00
|
|
|
nativeCheckInputs = lib.optionals stdenv.isLinux [ iputils ];
|
2023-07-01 13:39:58 +00:00
|
|
|
|
2023-08-01 21:25:46 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage gping.1
|
|
|
|
'';
|
|
|
|
|
2022-02-07 08:57:12 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/gping --version | grep "${version}"
|
|
|
|
'';
|
|
|
|
|
2018-12-25 20:13:44 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Ping, but with a graph";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/orf/gping";
|
2023-07-01 13:39:58 +00:00
|
|
|
changelog = "https://github.com/orf/gping/releases/tag/gping-v${version}";
|
2020-11-14 03:01:32 +00:00
|
|
|
license = licenses.mit;
|
2018-12-25 20:13:44 +00:00
|
|
|
maintainers = with maintainers; [ andrew-d ];
|
|
|
|
};
|
|
|
|
}
|