depot/third_party/nixpkgs/pkgs/tools/networking/gping/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

32 lines
835 B
Nix

{ lib
, iputils
, python3
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "gping";
version = "1.1";
propagatedBuildInputs = with python3Packages; [ colorama ];
src = python3Packages.fetchPypi {
inherit version;
pname = "pinggraph";
sha256 = "0q5ma98457zb6vxsnhmrr3p38j1vg0gl155y0adzfg67wlniac92";
};
# Make path to ping explicit
postFixup = ''
substituteInPlace $out/${python3.sitePackages}/gping/pinger.py \
--replace 'subprocess.getoutput("ping ' 'subprocess.getoutput("${iputils}/bin/ping ' \
--replace 'args = ["ping"]' 'args = ["${iputils}/bin/ping"]'
'';
meta = with lib; {
description = "Ping, but with a graph";
homepage = "https://github.com/orf/gping";
license = licenses.gpl2;
maintainers = with maintainers; [ andrew-d ];
};
}