about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/gping/default.nix
blob: 3ca9d3b553e46c90fa014518f7943bc1d96eb729 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, libiconv
, Security
}:

rustPlatform.buildRustPackage rec {
  pname = "gping";
  version = "1.3.0";

  src = fetchFromGitHub {
    owner = "orf";
    repo = "gping";
    rev = "gping-v${version}";
    sha256 = "sha256-Q7M/vDhECEIQ8s8qt1U7wESqv+Im79TyZ6s2vqjU5ps=";
  };

  cargoSha256 = "sha256-cnmjfvMqq8VDMvjFPnjmmH57Gaqttk36AwEtuuAT6qU=";

  buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];

  doInstallCheck = true;
  installCheckPhase = ''
    $out/bin/gping --version | grep "${version}"
  '';

  meta = with lib; {
    description = "Ping, but with a graph";
    homepage = "https://github.com/orf/gping";
    license = licenses.mit;
    maintainers = with maintainers; [ andrew-d ];
  };
}