2019-06-16 20:59:06 +01:00
|
|
|
{ lib
|
2021-05-15 22:01:12 +01:00
|
|
|
, stdenv
|
2020-11-14 03:01:32 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2023-08-01 22:25:46 +01:00
|
|
|
, installShellFiles
|
2021-05-15 22:01:12 +01:00
|
|
|
, libiconv
|
2022-02-07 08:56:32 +00:00
|
|
|
, Security
|
2023-07-01 14:39:58 +01: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";
|
2024-08-03 15:15:03 +01:00
|
|
|
version = "1.17.3";
|
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 13:53:43 +01:00
|
|
|
rev = "gping-v${version}";
|
2024-08-03 15:15:03 +01:00
|
|
|
hash = "sha256-DJ+5WoizFF3K9drFc955bDMXnlW+okYrZos/+dRVtjw=";
|
2018-12-25 20:13:44 +00:00
|
|
|
};
|
|
|
|
|
2024-08-03 15:15:03 +01:00
|
|
|
cargoHash = "sha256-pQ95sS2dGVzZUOyuUpJPamW7RLiUTGu9KgpWLg4wn/w=";
|
2018-12-25 20:13:44 +00:00
|
|
|
|
2022-02-07 08:56:32 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Security ];
|
2021-05-15 22:01:12 +01:00
|
|
|
|
2023-08-01 22:25:46 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2023-07-06 02:45:40 +01:00
|
|
|
nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ iputils ];
|
2023-07-01 14:39:58 +01:00
|
|
|
|
2023-08-01 22:25:46 +01: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 02:11:51 +01:00
|
|
|
homepage = "https://github.com/orf/gping";
|
2023-07-01 14:39:58 +01:00
|
|
|
changelog = "https://github.com/orf/gping/releases/tag/gping-v${version}";
|
2020-11-14 03:01:32 +00:00
|
|
|
license = licenses.mit;
|
2024-04-28 17:55:21 +01:00
|
|
|
maintainers = with maintainers; [ cafkafk ];
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "gping";
|
2018-12-25 20:13:44 +00:00
|
|
|
};
|
|
|
|
}
|