Merge pull request #103767 from evanjs/gping/0.1.6

gping: 1.1 -> 0.1.6
This commit is contained in:
Daniël de Kok 2020-11-16 14:53:38 +01:00 committed by GitHub
commit 04768cefa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,32 +1,25 @@
{ lib { lib
, iputils , rustPlatform
, python3 , fetchFromGitHub
, python3Packages
}: }:
python3Packages.buildPythonApplication rec { rustPlatform.buildRustPackage rec {
pname = "gping"; pname = "gping";
version = "1.1"; version = "0.1.6";
propagatedBuildInputs = with python3Packages; [ colorama ]; src = fetchFromGitHub {
owner = "orf";
src = python3Packages.fetchPypi { repo = "gping";
inherit version; rev = "v${version}";
pname = "pinggraph"; sha256 = "1scwwrrj30ff9yr776gpn4jyl3lbrx2s2dv0pc8b1zj7mvwp3as2";
sha256 = "0q5ma98457zb6vxsnhmrr3p38j1vg0gl155y0adzfg67wlniac92";
}; };
# Make path to ping explicit cargoSha256 = "1dsfrl5cajl9nmzl6p43j7j50xn1z7dymqaz8kqs7zalj9zadm8k";
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; { meta = with lib; {
description = "Ping, but with a graph"; description = "Ping, but with a graph";
homepage = "https://github.com/orf/gping"; homepage = "https://github.com/orf/gping";
license = licenses.gpl2; license = licenses.mit;
maintainers = with maintainers; [ andrew-d ]; maintainers = with maintainers; [ andrew-d ];
}; };
} }