From 7b760892d2f0d4a8083f173bd534fb54e7b78b32 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 31 Mar 2024 17:32:57 +0200 Subject: [PATCH 1/3] python312Packages.geocoder: init at 1.38.1 Geocoder is a simple and consistent https://pypi.org/project/geocoder/ --- .../python-modules/geocoder/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/geocoder/default.nix diff --git a/pkgs/development/python-modules/geocoder/default.nix b/pkgs/development/python-modules/geocoder/default.nix new file mode 100644 index 000000000000..d3152b6a63c5 --- /dev/null +++ b/pkgs/development/python-modules/geocoder/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, click +, fetchPypi +, future +, pythonOlder +, ratelim +, requests +, setuptools +, six +}: + +buildPythonPackage rec { + pname = "geocoder"; + version = "1.38.1"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-yZJTdMlhV30K7kA7Ceb46hlx2RPwEfAMpwx2vq96d+c="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + click + future + ratelim + requests + six + ]; + + pythonImportsCheck = [ + "geocoder" + ]; + + meta = with lib; { + description = "Module for geocoding"; + homepage = "https://pypi.org/project/geocoder/"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 541bc2d28fd1..a545aad6568e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4635,6 +4635,8 @@ self: super: with self; { geocachingapi = callPackage ../development/python-modules/geocachingapi { }; + geocoder = callPackage ../development/python-modules/geocoder { }; + geographiclib = callPackage ../development/python-modules/geographiclib { }; geoip2 = callPackage ../development/python-modules/geoip2 { }; From f5d6efdd9e6d3eeddb71b1c72586e583f040e809 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 31 Mar 2024 17:45:45 +0200 Subject: [PATCH 2/3] python312Packages.polyswarm-api: init at 3.5.2 Library to interface with the PolySwarm consumer APIs https://github.com/polyswarm/polyswarm-api --- .../python-modules/polyswarm-api/default.nix | 66 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 68 insertions(+) create mode 100644 pkgs/development/python-modules/polyswarm-api/default.nix diff --git a/pkgs/development/python-modules/polyswarm-api/default.nix b/pkgs/development/python-modules/polyswarm-api/default.nix new file mode 100644 index 000000000000..c9d851f49a6d --- /dev/null +++ b/pkgs/development/python-modules/polyswarm-api/default.nix @@ -0,0 +1,66 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, future +, jsonschema +, pytestCheckHook +, python-dateutil +, pythonOlder +, pythonRelaxDepsHook +, requests +, responses +, setuptools +, vcrpy +}: + +buildPythonPackage rec { + pname = "polyswarm-api"; + version = "3.5.2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "polyswarm"; + repo = "polyswarm-api"; + rev = "refs/tags/${version}"; + hash = "sha256-GMLgph6mjDSDn2CCfeqcqFY2gjtziH4xVHJhYTGRYw8="; + }; + + pythonRelaxDeps = [ + "future" + ]; + + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + build-system = [ + setuptools + ]; + + dependencies = [ + future + jsonschema + python-dateutil + requests + ]; + + nativeCheckInputs = [ + pytestCheckHook + responses + vcrpy + ]; + + pythonImportsCheck = [ + "polyswarm_api" + ]; + + meta = with lib; { + description = "Library to interface with the PolySwarm consumer APIs"; + homepage = "https://github.com/polyswarm/polyswarm-api"; + changelog = "https://github.com/polyswarm/polyswarm-api/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a545aad6568e..a8a626417a17 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10068,6 +10068,8 @@ self: super: with self; { polygon3 = callPackage ../development/python-modules/polygon3 { }; + polyswarm-api = callPackage ../development/python-modules/polyswarm-api { }; + pomegranate = callPackage ../development/python-modules/pomegranate { }; pontos = callPackage ../development/python-modules/pontos { }; From e70d52bacb61d2124021203e1be8d1e93363c157 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 31 Mar 2024 17:49:01 +0200 Subject: [PATCH 3/3] malwoverview: init at 5.4.2 Tool for threat hunting and gathering intel information from various sources https://github.com/alexandreborges/malwoverview --- pkgs/by-name/ma/malwoverview/package.nix | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 pkgs/by-name/ma/malwoverview/package.nix diff --git a/pkgs/by-name/ma/malwoverview/package.nix b/pkgs/by-name/ma/malwoverview/package.nix new file mode 100644 index 000000000000..db29831b4eec --- /dev/null +++ b/pkgs/by-name/ma/malwoverview/package.nix @@ -0,0 +1,57 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "malwoverview"; + version = "5.4.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "alexandreborges"; + repo = "malwoverview"; + rev = "refs/tags/v${version}"; + hash = "sha256-WAlVEEukPOynCGpRdQu3wP+JZ1UKuSR6pH5ek81L73E="; + }; + + pythonRemoveDeps = [ + "pathlib" + ]; + + nativeBuildInputs = with python3.pkgs; [ + pythonRelaxDepsHook + ]; + + build-system = with python3.pkgs; [ + setuptools + ]; + + dependencies = with python3.pkgs; [ + colorama + configparser + geocoder + pefile + polyswarm-api + python-magic + requests + simplejson + validators + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "malwoverview" + ]; + + meta = with lib; { + description = "Tool for threat hunting and gathering intel information from various sources"; + homepage = "https://github.com/alexandreborges/malwoverview"; + changelog = "https://github.com/alexandreborges/malwoverview/releases/tag/v${version}"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ fab ]; + mainProgram = "malwoverview.py"; + }; +}