From e0ad11f61b428bb81a33749183c752a96dfa8e7e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 29 Sep 2021 14:44:30 +0200 Subject: [PATCH 1/2] python3Packages.vt-py: init at 0.7.4 --- .../python-modules/vt-py/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/vt-py/default.nix diff --git a/pkgs/development/python-modules/vt-py/default.nix b/pkgs/development/python-modules/vt-py/default.nix new file mode 100644 index 000000000000..e208e3a76822 --- /dev/null +++ b/pkgs/development/python-modules/vt-py/default.nix @@ -0,0 +1,47 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytest-httpserver +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "vt-py"; + version = "0.7.4"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "VirusTotal"; + repo = pname; + rev = version; + sha256 = "149fgrqnwf8nyv3msj6p614zbdi7m7s785y3fvh8fm8k7lmgqk8w"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytest-asyncio + pytest-httpserver + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner'" "" + ''; + + pythonImportsCheck = [ "vt" ]; + + meta = with lib; { + description = "Python client library for VirusTotal"; + homepage = "https://virustotal.github.io/vt-py/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 686dd8c0f363..d2fe49e54a8a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9477,6 +9477,8 @@ in { vsure = callPackage ../development/python-modules/vsure { }; + vt-py = callPackage ../development/python-modules/vt-py { }; + vtk = toPythonModule (pkgs.vtk.override { pythonInterpreter = python; enablePython = true; From 95140031d45cd0ae33ca5249710d741e7978a582 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 29 Sep 2021 15:18:29 +0200 Subject: [PATCH 2/2] ioccheck: init at unstable-2021-09-29 --- pkgs/tools/security/ioccheck/default.nix | 57 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/tools/security/ioccheck/default.nix diff --git a/pkgs/tools/security/ioccheck/default.nix b/pkgs/tools/security/ioccheck/default.nix new file mode 100644 index 000000000000..1ad7bfd85fe2 --- /dev/null +++ b/pkgs/tools/security/ioccheck/default.nix @@ -0,0 +1,57 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "ioccheck"; + version = "unstable-2021-09-29"; + format = "pyproject"; + + disabled = python3.pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "ranguli"; + repo = pname; + rev = "db02d921e2519b77523a200ca2d78417802463db"; + sha256 = "0lgqypcd5lzb2yqd5lr02pba24m26ghly4immxgz13svi8f6vzm9"; + }; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + ]; + + propagatedBuildInputs = with python3.pkgs; [ + backoff + click + emoji + jinja2 + pyfiglet + ratelimit + requests + shodan + tabulate + termcolor + tweepy + vt-py + ]; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + postPatch = '' + # Can be removed with the next release + substituteInPlace pyproject.toml \ + --replace '"hurry.filesize" = "^0.9"' "" + ''; + + pythonImportsCheck = [ "ioccheck" ]; + + meta = with lib; { + description = "Tool for researching IOCs"; + homepage = "https://github.com/ranguli/ioccheck"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index add6df83af21..79677fa2a91c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6234,6 +6234,8 @@ with pkgs; iodine = callPackage ../tools/networking/iodine { }; + ioccheck = callPackage ../tools/security/ioccheck { }; + ioping = callPackage ../tools/system/ioping { }; iops = callPackage ../tools/system/iops { };