nixpkgs/pkgs/tools/networking/gping/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.0 KiB
Nix
Raw Normal View History

{ 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
}:
2020-11-14 03:01:32 +00:00
rustPlatform.buildRustPackage rec {
pname = "gping";
2023-08-01 21:25:23 +00:00
version = "1.14.0";
2020-11-14 03:01:32 +00:00
src = fetchFromGitHub {
owner = "orf";
repo = "gping";
rev = "gping-v${version}";
2023-08-01 21:25:23 +00:00
hash = "sha256-ReP+s2p0X39LVvl3/QF7fsYkU+OvsQyMhyuH8v4HuVU=";
};
2023-08-01 21:25:23 +00:00
cargoHash = "sha256-FTiNxCoEe/iMz68F1CpJHypgrhn4WwwWowuN9I1rl6E=";
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 ];
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}"
'';
meta = with lib; {
description = "Ping, but with a graph";
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;
maintainers = with maintainers; [ andrew-d ];
};
}