diff options
author | leenaars <leenaars@users.noreply.github.com> | 2018-08-01 15:40:57 +0200 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-08-01 15:40:57 +0200 |
commit | 2b75a7266c41d1b22f6296ac31fb3dc8d42eb33a (patch) | |
tree | 9d5698563e6fbf145a006c0529ca8c26aa1d8efa /pkgs/tools | |
parent | bdf6f8528e9a8827d9d6b56a7bd8f8ff5f4298cc (diff) | |
download | nixlib-2b75a7266c41d1b22f6296ac31fb3dc8d42eb33a.tar nixlib-2b75a7266c41d1b22f6296ac31fb3dc8d42eb33a.tar.gz nixlib-2b75a7266c41d1b22f6296ac31fb3dc8d42eb33a.tar.bz2 nixlib-2b75a7266c41d1b22f6296ac31fb3dc8d42eb33a.tar.lz nixlib-2b75a7266c41d1b22f6296ac31fb3dc8d42eb33a.tar.xz nixlib-2b75a7266c41d1b22f6296ac31fb3dc8d42eb33a.tar.zst nixlib-2b75a7266c41d1b22f6296ac31fb3dc8d42eb33a.zip |
ipgrep: init at 1.0 (#43887)
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/networking/ipgrep/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/networking/ipgrep/default.nix b/pkgs/tools/networking/ipgrep/default.nix new file mode 100644 index 000000000000..6052b7d405b5 --- /dev/null +++ b/pkgs/tools/networking/ipgrep/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, pythonPackages, makeWrapper }: + +pythonPackages.buildPythonApplication rec { + version = "1.0"; + pname = "ipgrep"; + + src = fetchFromGitHub { + owner = "jedisct1"; + repo = pname; + rev = version; + sha256 = "1qaxvbqdalvz05aplhhrg7s4h7yx4clbfd50k46bgavhgcqqv8n3"; + }; + + patchPhase = '' + mkdir -p ${pname} + substituteInPlace setup.py \ + --replace "'scripts': []" "'scripts': { '${pname}.py' }" + ''; + + propagatedBuildInputs = with pythonPackages; [ + pycares + urllib3 + requests + ]; + + meta = with stdenv.lib; { + description = "Extract, defang, resolve names and IPs from text"; + 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; + }; +} |