mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
48 lines
1.0 KiB
Nix
48 lines
1.0 KiB
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, libiconv
|
|
, Security
|
|
, iputils
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "gping";
|
|
version = "1.17.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "orf";
|
|
repo = "gping";
|
|
rev = "gping-v${version}";
|
|
hash = "sha256-DJ+5WoizFF3K9drFc955bDMXnlW+okYrZos/+dRVtjw=";
|
|
};
|
|
|
|
cargoHash = "sha256-pQ95sS2dGVzZUOyuUpJPamW7RLiUTGu9KgpWLg4wn/w=";
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
nativeCheckInputs = lib.optionals stdenv.isLinux [ iputils ];
|
|
|
|
postInstall = ''
|
|
installManPage gping.1
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
$out/bin/gping --version | grep "${version}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Ping, but with a graph";
|
|
homepage = "https://github.com/orf/gping";
|
|
changelog = "https://github.com/orf/gping/releases/tag/gping-v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ cafkafk ];
|
|
mainProgram = "gping";
|
|
};
|
|
}
|