From f5ec4b277fd5f86bfcbcd91b47cce013e2f0bcf6 Mon Sep 17 00:00:00 2001 From: Thane Gill Date: Tue, 23 Sep 2025 16:21:51 -0700 Subject: [PATCH 1/4] python3Packages.panzi-json-logic: init at 1.0.1 Apply suggestion from @uninsane Co-authored-by: Colin --- .../panzi-json-logic/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/panzi-json-logic/default.nix diff --git a/pkgs/development/python-modules/panzi-json-logic/default.nix b/pkgs/development/python-modules/panzi-json-logic/default.nix new file mode 100644 index 000000000000..292c42f14a1d --- /dev/null +++ b/pkgs/development/python-modules/panzi-json-logic/default.nix @@ -0,0 +1,33 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + unittestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "panzi-json-logic"; + version = "1.0.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "panzi"; + repo = "panzi-json-logic"; + tag = "v${version}"; + hash = "sha256-P34+7SckMtiCTZbdKsjztNam+/HWtcVQEnGPMoPBw3g="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ unittestCheckHook ]; + + pythonImportsCheck = [ "json_logic" ]; + + meta = { + description = "Pure Python 3 JsonLogic and CertLogic implementation."; + homepage = "https://github.com/panzi/panzi-json-logic"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ thanegill ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9cf17237c5b1..84a5c26d774b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11407,6 +11407,8 @@ self: super: with self; { panphon = callPackage ../development/python-modules/panphon { }; + panzi-json-logic = callPackage ../development/python-modules/panzi-json-logic { }; + paperbush = callPackage ../development/python-modules/paperbush { }; papermill = callPackage ../development/python-modules/papermill { }; From dcbdd66331ba18e0354183ef8df554ee3ed819d0 Mon Sep 17 00:00:00 2001 From: Thane Gill Date: Tue, 23 Sep 2025 16:24:45 -0700 Subject: [PATCH 2/4] python3Packages.price-parser: init at 0.4.0 Apply suggestion from @uninsane Co-authored-by: Colin --- .../python-modules/price-parser/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/price-parser/default.nix diff --git a/pkgs/development/python-modules/price-parser/default.nix b/pkgs/development/python-modules/price-parser/default.nix new file mode 100644 index 000000000000..c2baaced3afb --- /dev/null +++ b/pkgs/development/python-modules/price-parser/default.nix @@ -0,0 +1,39 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + setuptools, + pytest-cov, + attrs, +}: + +buildPythonPackage rec { + pname = "price-parser"; + version = "0.4.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "scrapinghub"; + repo = "price-parser"; + tag = version; + hash = "sha256-9f/+Yw94SVvg9fl9zYR9YEMwAgKHwySG5cysPMomnA0="; + }; + + dependencies = [ attrs ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov + ]; + + pythonImportsCheck = [ "price_parser" ]; + + meta = { + description = "Extract price amount and currency symbol from a raw text string"; + homepage = "https://github.com/scrapinghub/price-parser"; + changelog = "https://github.com/scrapinghub/price-parser/blob/${version}/CHANGES.rst"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ thanegill ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 84a5c26d774b..f03edcc57ae6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12151,6 +12151,8 @@ self: super: with self; { prettytable = callPackage ../development/python-modules/prettytable { }; + price-parser = callPackage ../development/python-modules/price-parser { }; + primecountpy = callPackage ../development/python-modules/primecountpy { }; primepy = callPackage ../development/python-modules/primepy { }; From 682d91c1cf0a4032cec5853d754618e4742ebde0 Mon Sep 17 00:00:00 2001 From: Thane Gill Date: Tue, 23 Sep 2025 16:26:13 -0700 Subject: [PATCH 3/4] python3packages.pyppeteer-ng: init at 2.0.0rc10 Apply suggestion from @uninsane Co-authored-by: Colin --- .../python-modules/pyppeteer-ng/default.nix | 160 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 162 insertions(+) create mode 100644 pkgs/development/python-modules/pyppeteer-ng/default.nix diff --git a/pkgs/development/python-modules/pyppeteer-ng/default.nix b/pkgs/development/python-modules/pyppeteer-ng/default.nix new file mode 100644 index 000000000000..b4674d023e26 --- /dev/null +++ b/pkgs/development/python-modules/pyppeteer-ng/default.nix @@ -0,0 +1,160 @@ +{ + lib, + aenum, + aiohttp, + appdirs, + buildPythonPackage, + certifi, + diff-match-patch, + fetchFromGitHub, + flake8, + importlib-metadata, + livereload, + mypy, + networkx, + ordered-set, + pillow, + pixelmatch, + poetry-core, + pre-commit, + pydocstyle, + pyee, + pylint, + pytest, + pytest-cov, + pytest-timeout, + pytest-xdist, + pytestCheckHook, + pythonOlder, + readme-renderer, + sphinx, + sphinxcontrib-asyncio, + syncer, + tox, + tqdm, + typing-extensions, + typing-inspect, + urllib3, + websockets, +}: + +buildPythonPackage rec { + pname = "pyppeteer-ng"; + version = "2.0.0rc10"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "dgtlmoon"; + repo = "pyppeteer-ng"; + tag = version; + hash = "sha256-NpxjKsh12pr/MCZ4gfoaa+3jTYyvQzHgSno1+rw2Wk0="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'aenum = "^2.2.3"' 'aenum = "*"' \ + --replace-fail 'typing_inspect = { version ="^0.5.0"' 'typing_inspect = { version ="*"' \ + --replace-fail 'urllib3 = "^1.25.8"' 'urllib3 = "*"' \ + --replace-fail 'websockets = "^10.1"' 'websockets = "*"' \ + --replace-fail 'requires = ["poetry>=0.12"]' 'requires = ["poetry-core"]' \ + --replace-fail 'build-backend = "poetry.masonry.api"' 'build-backend = "poetry.core.masonry.api"' + + substituteInPlace tests/conftest.py \ + --replace-fail '_port = get_free_port()' "" + + substituteInPlace tests/utils/server.py \ + --replace-fail '_Middleware' '_Middlewares' \ + ''; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + aenum + appdirs + certifi + ordered-set + pillow + pyee + tqdm + typing-inspect + typing-extensions + urllib3 + websockets + ]; + + nativeCheckInputs = [ + aiohttp + diff-match-patch + flake8 + livereload + mypy + networkx + pixelmatch + pre-commit + pydocstyle + pylint + pytest + pytest-cov + pytest-timeout + pytest-xdist + readme-renderer + sphinx + sphinxcontrib-asyncio + syncer + tox + pytestCheckHook + ]; + + disabledTestPaths = [ + # Requires network access + "tests/test_abnormal_crash.py" + "tests/test_accessibility.py" + "tests/test_browser.py" + "tests/test_browser_context.py" + "tests/test_browser_fetcher.py" + "tests/test_click.py" + "tests/test_connection.py" + "tests/test_coverage.py" + "tests/test_dialog.py" + "tests/test_element_handle.py" + "tests/test_emulation.py" + "tests/test_execution_context.py" + "tests/test_frame.py" + "tests/test_input.py" + "tests/test_jshandle.py" + "tests/test_keyboard.py" + "tests/test_launcher.py" + "tests/test_mouse.py" + "tests/test_navigation.py" + "tests/test_page.py" + "tests/test_pyppeteer.py" + "tests/test_queryselector.py" + "tests/test_requestinterception.py" + "tests/test_screenshot.py" + "tests/test_target.py" + "tests/test_touchscreen.py" + "tests/test_tracing.py" + "tests/test_worker.py" + + # Failing + "pyee12-compat/connection_stability_test.py" + "pyee12-compat/pyee_compatibility_test.py" + "pyee12-compat/real_websocket_test.py" + "pyee12-compat/simple_connection_test.py" + "pyee12-compat/simplified_test.py" + "tests/test_misc.py" + ]; + + pythonImportsCheck = [ "pyppeteer" ]; + + meta = with lib; { + description = "Headless chrome/chromium automation library (unofficial port of puppeteer)"; + mainProgram = "pyppeteer-install"; + homepage = "https://github.com/dgtlmoon/pyppeteer-ng"; + changelog = "https://github.com/dgtlmoon/pyppeteer-ng/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ thanegill ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f03edcc57ae6..50b85227dcb8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13822,6 +13822,8 @@ self: super: with self; { pyppeteer = callPackage ../development/python-modules/pyppeteer { }; + pyppeteer-ng = callPackage ../development/python-modules/pyppeteer-ng { }; + pyppmd = callPackage ../development/python-modules/pyppmd { }; pyprecice = callPackage ../development/python-modules/pyprecice { From 8bef5b5978e91f64594530bed7cbe60525804d87 Mon Sep 17 00:00:00 2001 From: Thane Gill Date: Tue, 23 Sep 2025 16:30:28 -0700 Subject: [PATCH 4/4] changedetection-io: 0.49.4 -> 0.50.14 Apply suggestion from @uninsane Co-authored-by: Colin --- .../by-name/ch/changedetection-io/package.nix | 57 ++++++++++++------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/pkgs/by-name/ch/changedetection-io/package.nix b/pkgs/by-name/ch/changedetection-io/package.nix index 918a95f10788..8148e58cef54 100644 --- a/pkgs/by-name/ch/changedetection-io/package.nix +++ b/pkgs/by-name/ch/changedetection-io/package.nix @@ -2,18 +2,19 @@ lib, fetchFromGitHub, python3, + gitUpdater, }: python3.pkgs.buildPythonApplication rec { pname = "changedetection-io"; - version = "0.49.4"; + version = "0.50.14"; format = "setuptools"; src = fetchFromGitHub { owner = "dgtlmoon"; repo = "changedetection.io"; tag = version; - hash = "sha256-EmtJ8XXPb75W4VPj4Si9fdzVLDKVfm+8P6UZZlMpMdI="; + hash = "sha256-zxCb2mmCicjDxilj/l8HabJm2FsFQB0yLNaRiIDltwI="; }; pythonRelaxDeps = true; @@ -22,14 +23,13 @@ python3.pkgs.buildPythonApplication rec { with python3.pkgs; [ apprise - beautifulsoup4 - brotli babel + beautifulsoup4 + blinker + brotli chardet cryptography - dnspython elementpath - eventlet extruct feedgen flask @@ -39,45 +39,62 @@ python3.pkgs.buildPythonApplication rec { flask-login flask-paginate flask-restful + flask-socketio flask-wtf + gevent greenlet inscriptis + janus jinja2 jinja2-time - jsonpath-ng jq + jsonpath-ng + jsonschema + levenshtein loguru lxml + openapi-core + openpyxl paho-mqtt - playwright - pyee - pyppeteer + panzi-json-logic + pluggy + price-parser + psutil + pyppeteer-ng + # pyppeteerstealth + python-engineio + python-magic + python-socketio pytz + referencing requests + requests-file selenium - setuptools timeago - urllib3 + tzdata validators werkzeug wtforms ] - ++ requests.optional-dependencies.socks; + ++ requests.optional-dependencies.socks + ++ openapi-core.optional-dependencies.flask; # tests can currently not be run in one pytest invocation and without docker doCheck = false; - nativeCheckInputs = with python3.pkgs; [ - pytest-flask - pytestCheckHook - ]; + pythonImportsCheck = [ "changedetectionio" ]; - meta = with lib; { + passthru.updateScript = gitUpdater { }; + + meta = { description = "Self-hosted free open source website change detection tracking, monitoring and notification service"; homepage = "https://github.com/dgtlmoon/changedetection.io"; changelog = "https://github.com/dgtlmoon/changedetection.io/releases/tag/${src.tag}"; - license = licenses.asl20; - maintainers = with maintainers; [ mikaelfangel ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + mikaelfangel + thanegill + ]; mainProgram = "changedetection.io"; }; }