From 18b481134f36b5bf2e72a5c86d5dd272daf398a2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 21 Mar 2024 10:01:00 +0100 Subject: [PATCH 1/6] python311Packages.defang: init at 0.5.3 Module to defang and refang malicious URLs https://bitbucket.org/johannestaas/defang --- .../python-modules/defang/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/defang/default.nix diff --git a/pkgs/development/python-modules/defang/default.nix b/pkgs/development/python-modules/defang/default.nix new file mode 100644 index 000000000000..d51573c0dc4f --- /dev/null +++ b/pkgs/development/python-modules/defang/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromBitbucket +, pytestCheckHook +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "defang"; + version = "0.5.3"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromBitbucket { + owner = "johannestaas"; + repo = "defang"; + rev = "refs/tags/${version}"; + hash = "sha256-OJfayJeVf2H1/jg7/fu2NiHhRHNCaLGI29SY8BnJyxI="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "defang" + ]; + + meta = with lib; { + description = "Module to defang and refang malicious URLs"; + homepage = "https://bitbucket.org/johannestaas/defang"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 99d71bdcb520..830a7c370f70 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2836,6 +2836,8 @@ self: super: with self; { deezer-python = callPackage ../development/python-modules/deezer-python { }; + defang = callPackage ../development/python-modules/defang { }; + defcon = callPackage ../development/python-modules/defcon { }; deform = callPackage ../development/python-modules/deform { }; From 71731f7967fa4e339eb006d352c5388e451203c8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 21 Mar 2024 10:17:34 +0100 Subject: [PATCH 2/6] python311Packages.speechrecognition: init at 3.10.1 Speech recognition module for Python, supporting several engines and APIs, online and offline https://github.com/Uberi/speech_recognition --- .../speechrecognition/default.nix | 63 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 65 insertions(+) create mode 100644 pkgs/development/python-modules/speechrecognition/default.nix diff --git a/pkgs/development/python-modules/speechrecognition/default.nix b/pkgs/development/python-modules/speechrecognition/default.nix new file mode 100644 index 000000000000..4e50e8260a0f --- /dev/null +++ b/pkgs/development/python-modules/speechrecognition/default.nix @@ -0,0 +1,63 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pytestCheckHook +, pythonOlder +, torch +, requests +, setuptools +, soundfile +, typing-extensions +}: + +buildPythonPackage rec { + pname = "speechrecognition"; + version = "3.10.1"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "Uberi"; + repo = "speech_recognition"; + rev = "refs/tags/${version}"; + hash = "sha256-lO1CW4j5aBnPtemNGsW8cytSa/H+Tb4Jpbfh4Z/0WHk="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + requests + typing-extensions + ]; + + nativeCheckInputs = [ + numpy + pytestCheckHook + torch + soundfile + ]; + + pythonImportsCheck = [ + "speech_recognition" + ]; + + disabledTests = [ + # Test files are missing in source + "test_flac" + # Attribute error + "test_whisper" + # PocketSphinx is not available in Nixpkgs + "test_sphinx" + ]; + + meta = with lib; { + description = "Speech recognition module for Python, supporting several engines and APIs, online and offline"; + homepage = "https://github.com/Uberi/speech_recognition"; + license = with licenses; [ gpl2Only bsd3 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 830a7c370f70..010704efbb8f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13910,6 +13910,8 @@ self: super: with self; { speechbrain = callPackage ../development/python-modules/speechbrain { }; + speechrecognition = callPackage ../development/python-modules/speechrecognition { }; + speedtest-cli = callPackage ../development/python-modules/speedtest-cli { }; speg = callPackage ../development/python-modules/speg { }; From 29c51b9e3ea1aa01340fc62a1d611ab4733849fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 21 Mar 2024 10:23:29 +0100 Subject: [PATCH 3/6] python311Packages.playwright-stealth: init at 1.0.6-unstable-2023-09-11 Playwright stealth https://github.com/AtuboDad/playwright_stealth --- .../playwright-stealth/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/playwright-stealth/default.nix diff --git a/pkgs/development/python-modules/playwright-stealth/default.nix b/pkgs/development/python-modules/playwright-stealth/default.nix new file mode 100644 index 000000000000..a805d36f432f --- /dev/null +++ b/pkgs/development/python-modules/playwright-stealth/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, playwright +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "playwright-stealth"; + version = "1.0.6-unstable-2023-09-11"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "AtuboDad"; + repo = "playwright_stealth"; + # https://github.com/AtuboDad/playwright_stealth/issues/25 + rev = "43f7433057906945b1648179304d7dbd8eb10874"; + hash = "sha256-ZWmuVwjEgrPmfxjvws3TdocW6tyNH++fyRfKQ0oJ6bo="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + playwright + ]; + + # Tests require Chromium binary + doCheck = false; + + pythonImportsCheck = [ + "playwright_stealth" + ]; + + meta = with lib; { + description = "Playwright stealth"; + homepage = "https://github.com/AtuboDad/playwright_stealth"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 010704efbb8f..9a7d4c827994 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9655,6 +9655,8 @@ self: super: with self; { playwright = callPackage ../development/python-modules/playwright { }; + playwright-stealth = callPackage ../development/python-modules/playwright-stealth { }; + pmsensor = callPackage ../development/python-modules/pmsensor { }; ppdeep = callPackage ../development/python-modules/ppdeep { }; From a44fb04c2afcda64de543bd3cd277cf6651524b4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 21 Mar 2024 10:37:10 +0100 Subject: [PATCH 4/6] python311Packages.playwrightcapture: init at 1.23.13 Capture a URL with Playwright https://github.com/Lookyloo/PlaywrightCapture --- .../playwrightcapture/default.nix | 82 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 84 insertions(+) create mode 100644 pkgs/development/python-modules/playwrightcapture/default.nix diff --git a/pkgs/development/python-modules/playwrightcapture/default.nix b/pkgs/development/python-modules/playwrightcapture/default.nix new file mode 100644 index 000000000000..40fb7397c70a --- /dev/null +++ b/pkgs/development/python-modules/playwrightcapture/default.nix @@ -0,0 +1,82 @@ +{ lib +, beautifulsoup4 +, buildPythonPackage +, dateparser +, fetchFromGitHub +, playwright +, playwright-stealth +, poetry-core +, puremagic +, pydub +, pythonOlder +, pythonRelaxDepsHook +, pytz +, requests +, setuptools +, speechrecognition +, tzdata +, w3lib +}: + +buildPythonPackage rec { + pname = "playwrightcapture"; + version = "1.23.13"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "Lookyloo"; + repo = "PlaywrightCapture"; + rev = "refs/tags/v${version}"; + hash = "sha256-jNTVdGrUQaYHgTxz6zYTdxNQoXEfy/zshherC/gGmng="; + }; + + pythonRelaxDeps = [ + "beautifulsoup4" + "playwright" + "setuptools" + "tzdata" + ]; + + nativeBuildInputs = [ + poetry-core + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = [ + beautifulsoup4 + dateparser + playwright + playwright-stealth + puremagic + pytz + requests + setuptools + tzdata + w3lib + ]; + + passthru.optional-dependencies = { + recaptcha = [ + speechrecognition + pydub + requests + ]; + }; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "playwrightcapture" + ]; + + meta = with lib; { + description = "Capture a URL with Playwright"; + homepage = "https://github.com/Lookyloo/PlaywrightCapture"; + changelog = "https://github.com/Lookyloo/PlaywrightCapture/releases/tag/v${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9a7d4c827994..2028b8d5cbc7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9657,6 +9657,8 @@ self: super: with self; { playwright-stealth = callPackage ../development/python-modules/playwright-stealth { }; + playwrightcapture = callPackage ../development/python-modules/playwrightcapture { }; + pmsensor = callPackage ../development/python-modules/pmsensor { }; ppdeep = callPackage ../development/python-modules/ppdeep { }; From 8a0d04018a7b7ea63f27b339c3c3091d0bf16e61 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 21 Mar 2024 10:39:35 +0100 Subject: [PATCH 5/6] python311Packages.lacuscore: init at 1.8.10 The modulable part of Lacus https://github.com/ail-project/LacusCore --- .../python-modules/lacuscore/default.nix | 65 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/lacuscore/default.nix diff --git a/pkgs/development/python-modules/lacuscore/default.nix b/pkgs/development/python-modules/lacuscore/default.nix new file mode 100644 index 000000000000..fa7949eff097 --- /dev/null +++ b/pkgs/development/python-modules/lacuscore/default.nix @@ -0,0 +1,65 @@ +{ lib +, async-timeout +, buildPythonPackage +, defang +, dnspython +, fetchFromGitHub +, playwrightcapture +, poetry-core +, pythonOlder +, redis +, requests +, pythonRelaxDepsHook +, sphinx +, ua-parser +}: + +buildPythonPackage rec { + pname = "lacuscore"; + version = "1.8.10"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "ail-project"; + repo = "LacusCore"; + rev = "refs/tags/v${version}"; + hash = "sha256-X3Bs/eMkpobRqiGB70ujvaIO1xWftEBZFyR9i5eN7/A="; + }; + + pythonRelaxDeps = [ + "redis" + ]; + + nativeBuildInputs = [ + poetry-core + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = [ + async-timeout + defang + dnspython + playwrightcapture + redis + requests + sphinx + ua-parser + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "lacuscore" + ]; + + meta = with lib; { + description = "The modulable part of Lacus"; + homepage = "https://github.com/ail-project/LacusCore"; + changelog = "https://github.com/ail-project/LacusCore/releases/tag/v${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2028b8d5cbc7..80b12f358d33 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6342,6 +6342,8 @@ self: super: with self; { laces = callPackage ../development/python-modules/laces { }; + lacuscore = callPackage ../development/python-modules/lacuscore { }; + lakeside = callPackage ../development/python-modules/lakeside { }; langchain = callPackage ../development/python-modules/langchain { }; From 27b35a3f0e057e5d0de390094d3e4d68fa97264e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 21 Mar 2024 10:43:52 +0100 Subject: [PATCH 6/6] lacus: init at 1.8.0 Capturing system using playwright https://github.com/ail-project/lacus --- pkgs/by-name/la/lacus/package.nix | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/la/lacus/package.nix diff --git a/pkgs/by-name/la/lacus/package.nix b/pkgs/by-name/la/lacus/package.nix new file mode 100644 index 000000000000..1bef9b506093 --- /dev/null +++ b/pkgs/by-name/la/lacus/package.nix @@ -0,0 +1,39 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "lacus"; + version = "1.8.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ail-project"; + repo = "lacus"; + rev = "refs/tags/v${version}"; + hash = "sha256-3sgTt3SsasltChCqHAWyujtUvoLwHWZzfWwlfnJA+zE="; + }; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + ]; + + propagatedBuildInputs = with python3.pkgs; [ + flask-restx + gunicorn + lacuscore + psutil + redis + rich + werkzeug + ]; + + meta = with lib; { + description = "Capturing system using playwright"; + homepage = "https://github.com/ail-project/lacus"; + changelog = "https://github.com/ail-project/lacus/releases/tag/v${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +}