mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
iputils,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "gping";
|
|
version = "1.21.0";
|
|
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "orf";
|
|
repo = "gping";
|
|
tag = "gping-v${finalAttrs.version}";
|
|
hash = "sha256-+oJzm7lEYS3K+GlYMfSxO2qkUb3AXy04e1YVflar9yI=";
|
|
};
|
|
|
|
cargoHash = "sha256-6tAHfcXTMorob0wjdWNxKJ7wAZrwGZqH2hgX9AzN3Yc=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ iputils ];
|
|
|
|
postInstall = ''
|
|
installManPage gping.1
|
|
'';
|
|
|
|
# Requires internet access
|
|
checkFlags = [
|
|
"--skip=test::tests::test_integration_any"
|
|
"--skip=test::tests::test_integration_ip6"
|
|
"--skip=test::tests::test_integration_ipv4"
|
|
];
|
|
|
|
doInstallCheck = true;
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Ping, but with a graph";
|
|
homepage = "https://github.com/orf/gping";
|
|
changelog = "https://github.com/orf/gping/releases/tag/gping-v${finalAttrs.version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ cafkafk ];
|
|
mainProgram = "gping";
|
|
};
|
|
})
|