2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, python3Packages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
version = "1.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ipgrep";
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = python3Packages.isPy27;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jedisct1";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-09-25 04:45:31 +00:00
|
|
|
hash = "sha256-NrhcUFQM+L66KaDRRpAoC+z5s54a+1fqEepTRXVZ5Qs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
mkdir -p ${pname}
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'scripts': []" "'scripts': { '${pname}.py' }"
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2020-04-24 23:36:52 +00:00
|
|
|
pycares
|
|
|
|
urllib3
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extract, defang, resolve names and IPs from text";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ipgrep.py";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
ipgrep extracts possibly obfuscated host names and IP addresses
|
|
|
|
from text, resolves host names, and prints them, sorted by ASN.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|