From 4a1640af349c57c0b0889767d9d49b2d3d6a1c41 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 4 Feb 2023 10:18:24 -0300 Subject: [PATCH] wtfis: init at 0.5.1 --- .../wtfis/000-pyproject-remove-versions.diff | 29 +++++++++++++ pkgs/tools/networking/wtfis/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 72 insertions(+) create mode 100644 pkgs/tools/networking/wtfis/000-pyproject-remove-versions.diff create mode 100644 pkgs/tools/networking/wtfis/default.nix diff --git a/pkgs/tools/networking/wtfis/000-pyproject-remove-versions.diff b/pkgs/tools/networking/wtfis/000-pyproject-remove-versions.diff new file mode 100644 index 000000000000..b94ca03bb317 --- /dev/null +++ b/pkgs/tools/networking/wtfis/000-pyproject-remove-versions.diff @@ -0,0 +1,29 @@ +diff -Naur source-old/pyproject.toml source-new/pyproject.toml +--- source-old/pyproject.toml 1980-01-02 00:00:00.000000000 -0300 ++++ source-new/pyproject.toml 2023-02-04 10:09:48.087418202 -0300 +@@ -29,11 +29,11 @@ + "Topic :: Security", + ] + dependencies = [ +- "pydantic~=1.10.2", +- "python-dotenv~=0.21.0", +- "requests~=2.28.1", +- "rich~=12.6.0", +- "shodan~=1.28.0", ++ "pydantic", ++ "python-dotenv", ++ "requests", ++ "rich", ++ "shodan", + ] + dynamic = ["version"] + +@@ -63,7 +63,7 @@ + "mypy", + "pytest", + "pytest-cov", +- "types-requests~=2.28.1", ++ "types-requests", + ] + [tool.hatch.envs.default.scripts] + typecheck = "mypy -p {args:wtfis}" diff --git a/pkgs/tools/networking/wtfis/default.nix b/pkgs/tools/networking/wtfis/default.nix new file mode 100644 index 000000000000..30c2eda8eda0 --- /dev/null +++ b/pkgs/tools/networking/wtfis/default.nix @@ -0,0 +1,41 @@ +{ lib +, stdenv +, fetchFromGitHub +, python3 +}: + +let + pname = "wtfis"; + version = "0.5.1"; +in python3.pkgs.buildPythonApplication { + inherit pname version; + + src = fetchFromGitHub { + owner = "pirxthepilot"; + repo = "wtfis"; + rev = "v${version}"; + hash = "sha256-XoQ/iJTdZoekA5guxI8POG4NEhN8Up3OuIz344G75ao="; + }; + + patches = [ + # TODO: get rid of that newbie patch + ./000-pyproject-remove-versions.diff + ]; + + format = "pyproject"; + + propagatedBuildInputs = [ + python3.pkgs.hatchling + python3.pkgs.pydantic + python3.pkgs.rich + python3.pkgs.shodan + python3.pkgs.python-dotenv + ]; + + meta = { + homepage = "https://github.com/pirxthepilot/wtfis"; + description = "Passive hostname, domain and IP lookup tool for non-robots"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.AndersonTorres ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5ca442444ac9..f07275afe56f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38796,6 +38796,8 @@ with pkgs; undaemonize = callPackage ../tools/system/undaemonize {}; + wtfis = callPackage ../tools/networking/wtfis { }; + houdini = callPackage ../applications/misc/houdini {}; openfst = callPackage ../development/libraries/openfst {};