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