Added homepage where missing, where the sources are pulled from: - https://github.com - https://git.sr.ht - https://gitlab.com - https://invent.kde.org - https://codeberg.org - https://gitlab.gnome.org - https://gitlab.freedesktop.org - https://git.FreeBSD.org - https://salsa.debian.org - https://git.tvdr.de - https://git.suckless.org
47 lines
1.0 KiB
Nix
47 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3Packages,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication (finalAttrs: {
|
|
pname = "ipgrep";
|
|
version = "1.0.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jedisct1";
|
|
repo = "ipgrep";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-4Fa0fqd8S6yZmUzHlgkUWgYZhAbf48zZhzq4Fx3MS5A=";
|
|
};
|
|
|
|
patchPhase = ''
|
|
mkdir -p ipgrep
|
|
substituteInPlace setup.py \
|
|
--replace-fail "'scripts': []" "'scripts': { 'ipgrep.py' }"
|
|
'';
|
|
|
|
build-system = with python3Packages; [
|
|
setuptools
|
|
];
|
|
|
|
dependencies = with python3Packages; [
|
|
pycares
|
|
urllib3
|
|
requests
|
|
];
|
|
|
|
meta = {
|
|
description = "Extract, defang, resolve names and IPs from text";
|
|
mainProgram = "ipgrep.py";
|
|
longDescription = ''
|
|
ipgrep extracts possibly obfuscated host names and IP addresses
|
|
from text, resolves host names, and prints them, sorted by ASN.
|
|
'';
|
|
homepage = "https://github.com/jedisct1/ipgrep";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|