From 89bc978b5c32ca5000a1b0575fdcb1c2130355d9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 1 Jul 2026 02:18:54 +0200 Subject: [PATCH 1/6] python3Packages.alphashape: init at 1.3.1 Toolbox for generating n-dimensional alpha shapes https://github.com/bellockk/alphashape --- .../python-modules/alphashape/default.nix | 65 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/alphashape/default.nix diff --git a/pkgs/development/python-modules/alphashape/default.nix b/pkgs/development/python-modules/alphashape/default.nix new file mode 100644 index 000000000000..cd0c7843f15f --- /dev/null +++ b/pkgs/development/python-modules/alphashape/default.nix @@ -0,0 +1,65 @@ +{ + lib, + buildPythonPackage, + click, + click-log, + fetchFromGitHub, + geopandas, + networkx, + numpy, + pytestCheckHook, + rtree, + scipy, + setuptools, + shapely, + trimesh, +}: + +buildPythonPackage (finalAttrs: { + pname = "alphashape"; + version = "1.3.1"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "bellockk"; + repo = "alphashape"; + tag = "v${finalAttrs.version}"; + hash = "sha256-T2wyU6fpiYRA1+9n//5EtOLhO1fzccQsie+gQj729Vs="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + click + click-log + shapely + numpy + trimesh + networkx + rtree + scipy + ]; + + nativeCheckInputs = [ + geopandas + pytestCheckHook + ]; + + disabledTests = [ + # TypeError + "test_given_a_four_point_polygon_with_no_alpha_return_input" + "test_given_a_point_return_a_point" + ]; + + pythonImportsCheck = [ "alphashape" ]; + + meta = with lib; { + description = "Toolbox for generating n-dimensional alpha shapes"; + homepage = "https://github.com/bellockk/alphashape"; + changelog = "https://github.com/bellockk/alphashape/releases/tag/${finalAttrs.src.tag}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 467fcdfb9c96..1a2f579f4ce4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -780,6 +780,8 @@ self: super: with self; { alphaessopenapi = callPackage ../development/python-modules/alphaessopenapi { }; + alphashape = callPackage ../development/python-modules/alphashape { }; + altair = callPackage ../development/python-modules/altair { }; altcha = callPackage ../development/python-modules/altcha { }; From d42663c1e2cd886b499b53c5da581047909fcc90 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 3 Jul 2026 00:11:24 +0200 Subject: [PATCH 2/6] python3Packages.fake-http-header: init at 0.3.5-unstable-2025-07-09 Generates random request fields for a http request header https://github.com/MichaelTatarski/fake-http-header --- .../fake-http-header/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/fake-http-header/default.nix diff --git a/pkgs/development/python-modules/fake-http-header/default.nix b/pkgs/development/python-modules/fake-http-header/default.nix new file mode 100644 index 000000000000..9f5e78110fe4 --- /dev/null +++ b/pkgs/development/python-modules/fake-http-header/default.nix @@ -0,0 +1,35 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage (finalAttrs: { + pname = "fake-http-header"; + version = "0.3.5-unstable-2025-07-09"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "MichaelTatarski"; + repo = "fake-http-header"; + # https://github.com/MichaelTatarski/fake-http-header/issues/4 + rev = "0f110477d3ecae916e88608a123360227bfb6109"; + hash = "sha256-CznvDjzUeA0THsiIhuzvEDb4gXsP8IujpSCjt857qSo="; + }; + build-system = [ setuptools ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "fake_http_header" ]; + + meta = with lib; { + description = "Generates random request fields for a http request header"; + homepage = "https://github.com/MichaelTatarski/fake-http-header"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1a2f579f4ce4..e1566f213be7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5503,6 +5503,8 @@ self: super: with self; { }; }; + fake-http-header = callPackage ../development/python-modules/fake-http-header { }; + fake-useragent = callPackage ../development/python-modules/fake-useragent { }; faker = callPackage ../development/python-modules/faker { }; From 20701d54228d74ede003b354b726e6cf89001774 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 3 Jul 2026 00:27:12 +0200 Subject: [PATCH 3/6] python3Packages.tf-playwright-stealth: init at 1.2.2-unstable-2026-06-30 Module for using playwright stealthy https://github.com/tinyfish-io/tf-playwright-stealth --- .../tf-playwright-stealth/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/tf-playwright-stealth/default.nix diff --git a/pkgs/development/python-modules/tf-playwright-stealth/default.nix b/pkgs/development/python-modules/tf-playwright-stealth/default.nix new file mode 100644 index 000000000000..3da1803b3b0b --- /dev/null +++ b/pkgs/development/python-modules/tf-playwright-stealth/default.nix @@ -0,0 +1,62 @@ +{ + lib, + buildPythonPackage, + fake-http-header, + fetchFromGitHub, + idna, + mockito, + playwright, + poetry-core, + pytestCheckHook, + urllib3, +}: + +buildPythonPackage (finalAttrs: { + pname = "tf-playwright-stealth"; + version = "1.2.2-unstable-2026-06-30"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "tinyfish-io"; + repo = "tf-playwright-stealth"; + rev = "01b1b7a436edee4363a5d6f78f626a602550138b"; + hash = "sha256-dUU0JqnEda0s6nVzJNmU1l536YZ05SI3DYhb7onuBwY="; + }; + + pythonRelaxDeps = [ + "idna" + "urllib3" + ]; + + pythonRemoveDeps = [ "agentql" ]; + + build-system = [ poetry-core ]; + + dependencies = [ + fake-http-header + idna + playwright + urllib3 + ]; + + nativeCheckInputs = [ + mockito + pytestCheckHook + ]; + + pythonImportsCheck = [ "playwright_stealth" ]; + + disabledTestPaths = [ + # Requires agentql + "tests/e2e/" + ]; + + meta = with lib; { + description = "Module for using playwright stealthy"; + homepage = "https://github.com/tinyfish-io/tf-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 e1566f213be7..22bb66f98868 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19878,6 +19878,8 @@ self: super: with self; { tf-keras = callPackage ../development/python-modules/tf-keras { }; + tf-playwright-stealth = callPackage ../development/python-modules/tf-playwright-stealth { }; + tf2onnx = callPackage ../development/python-modules/tf2onnx { }; tflearn = callPackage ../development/python-modules/tflearn { }; From 2920ff399d36fdffc2c26c2d93241fa3fae670d5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 3 Jul 2026 00:30:08 +0200 Subject: [PATCH 4/6] python3Packages.patchright: init at 1.58.0 Undetected Python version of the Playwright testing and automation library https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python --- .../python-modules/patchright/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/patchright/default.nix diff --git a/pkgs/development/python-modules/patchright/default.nix b/pkgs/development/python-modules/patchright/default.nix new file mode 100644 index 000000000000..f36176539867 --- /dev/null +++ b/pkgs/development/python-modules/patchright/default.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + playwright, + setuptools, + toml, +}: + +buildPythonPackage (finalAttrs: { + pname = "patchright"; + version = "1.58.0"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "Kaliiiiiiiiii-Vinyzu"; + repo = "patchright-python"; + tag = "v${finalAttrs.version}"; + hash = "sha256-msV0CbVbTDSAB1BgxkUOpuzQDr8vMK2/wxJy1SSUU80="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + playwright + toml + ]; + + # Module has no tests + doCheck = false; + + # pythonImportsCheck disabled: module attempts filesystem writes at import time + pythonImportsCheck = [ ]; + + meta = { + description = "Undetected Python version of the Playwright testing and automation library"; + homepage = "https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python"; + changelog = "https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python/releases/tag/v${finalAttrs.src.tag}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 22bb66f98868..ea234bf8c583 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12563,6 +12563,8 @@ self: super: with self; { patchpy = callPackage ../development/python-modules/patchpy { }; + patchright = callPackage ../development/python-modules/patchright { }; + path = callPackage ../development/python-modules/path { }; path-and-address = callPackage ../development/python-modules/path-and-address { }; From acf7b12ebb6d457b9823b28f01b8d209d2c59c17 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 3 Jul 2026 02:10:28 +0200 Subject: [PATCH 5/6] python3Packages.unclecode-litellm: init at 1.81.13 Pre-compromise fork of litellm to interface with LLM API providers https://pypi.org/project/unclecode-litellm --- .../unclecode-litellm/default.nix | 64 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/python-modules/unclecode-litellm/default.nix diff --git a/pkgs/development/python-modules/unclecode-litellm/default.nix b/pkgs/development/python-modules/unclecode-litellm/default.nix new file mode 100644 index 000000000000..cdf3bb42eea9 --- /dev/null +++ b/pkgs/development/python-modules/unclecode-litellm/default.nix @@ -0,0 +1,64 @@ +{ + lib, + aiohttp, + buildPythonPackage, + click, + fastuuid, + fetchPypi, + httpx, + importlib-metadata, + jinja2, + jsonschema, + nix-update-script, + openai, + pydantic, + python-dotenv, + setuptools, + tiktoken, + tokenizers, +}: + +buildPythonPackage (finalAttrs: { + pname = "unclecode-litellm"; + version = "1.81.13"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchPypi { + pname = "unclecode_litellm"; + inherit (finalAttrs) version; + hash = "sha256-23DjTj6FnAoH8CywLqpkT4+ktOzF4vO+mli9fRw/7tw="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + click + fastuuid + httpx + importlib-metadata + jinja2 + jsonschema + openai + pydantic + python-dotenv + tiktoken + tokenizers + ]; + + # tests require access network + doCheck = false; + + pythonImportsCheck = [ "litellm" ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Pre-compromise fork of litellm to interface with LLM API providers"; + homepage = "https://pypi.org/project/unclecode-litellm"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ea234bf8c583..01b95ac9839e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -21134,6 +21134,8 @@ self: super: with self; { uncertainties = callPackage ../development/python-modules/uncertainties { }; + unclecode-litellm = callPackage ../development/python-modules/unclecode-litellm { }; + uncompresspy = callPackage ../development/python-modules/uncompresspy { }; uncompyle6 = callPackage ../development/python-modules/uncompyle6 { }; From 2fa7554065defd166e019426849ace88d7dc8a73 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 3 Jul 2026 10:42:14 +0200 Subject: [PATCH 6/6] python3Packages.crawl4ai: init at 0.9.0 LLM Friendly Web Crawler & Scraper https://github.com/unclecode/crawl4ai --- .../python-modules/crawl4ai/default.nix | 269 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 271 insertions(+) create mode 100644 pkgs/development/python-modules/crawl4ai/default.nix diff --git a/pkgs/development/python-modules/crawl4ai/default.nix b/pkgs/development/python-modules/crawl4ai/default.nix new file mode 100644 index 000000000000..42422ab60e3c --- /dev/null +++ b/pkgs/development/python-modules/crawl4ai/default.nix @@ -0,0 +1,269 @@ +{ + lib, + aiofiles, + aiohttp, + aiosqlite, + alphashape, + anyio, + beautifulsoup4, + brotli, + buildPythonPackage, + chardet, + click, + cssselect, + fake-useragent, + fetchFromGitHub, + h2, + httpx, + humanize, + lark, + litellm, + lxml, + nltk, + numpy, + patchright, + pillow, + playwright-stealth, + playwright, + psutil, + pydantic, + pyopenssl, + pypdf, + pytest-asyncio, + pytestCheckHook, + python-dotenv, + pyyaml, + rank-bm25, + requests, + rich, + scikit-learn, + selenium, + sentence-transformers, + setuptools, + shapely, + snowballstemmer, + tokenizers, + torch, + transformers, + unclecode-litellm, + writableTmpDirAsHomeHook, + xxhash, +}: + +buildPythonPackage (finalAttrs: { + pname = "crawl4ai"; + version = "0.9.0"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "unclecode"; + repo = "crawl4ai"; + tag = "v${finalAttrs.version}"; + hash = "sha256-MHCnhp7itaJ6y++uUCnObBjiJ9Jw/aFBtd35WzDBz1A="; + }; + + pythonRelaxDeps = [ + "lxml" + "snowballstemmer" + ]; + + pythonRemoveDeps = [ "patchright" ]; + + build-system = [ + setuptools + writableTmpDirAsHomeHook + ]; + + dependencies = [ + aiofiles + aiohttp + aiosqlite + alphashape + anyio + beautifulsoup4 + brotli + chardet + click + cssselect + fake-useragent + httpx + humanize + lark + litellm + lxml + nltk + numpy + patchright + pillow + playwright + playwright-stealth + psutil + pydantic + pyopenssl + python-dotenv + pyyaml + rank-bm25 + requests + rich + shapely + snowballstemmer + unclecode-litellm + xxhash + ]; + + optional-dependencies = { + all = [ + nltk + pypdf + scikit-learn + selenium + sentence-transformers + tokenizers + torch + transformers + ]; + cosine = [ + nltk + sentence-transformers + torch + transformers + ]; + pdf = [ pypdf ]; + sync = [ selenium ]; + torch = [ + nltk + scikit-learn + torch + ]; + transformer = [ + sentence-transformers + tokenizers + transformers + ]; + }; + + nativeCheckInputs = [ + h2 + pytest-asyncio + pytestCheckHook + ] + ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies); + + pytestFlags = [ "--continue-on-collection-errors" ]; + + disabledTestPaths = [ + # sys.exit(1) that crashes pytest + "tests/test_cloud_bugs_batch.py" + # Require docker, browser, LLM API, network and parts + "deploy/docker/" + "docs/examples/" + "tests/adaptive/" + "tests/async/" + "tests/browser/" + "tests/cache_validation/test_end_to_end.py" + "tests/cache_validation/test_real_domains.py" + "tests/deep_crawling/test_deep_crawl_resume_integration.py" + "tests/docker/test_config_object.py" + "tests/docker/test_docker.py" + "tests/docker/test_filter_deep_crawl.py" + "tests/docker/test_hooks_client.py" + "tests/docker/test_hooks_comprehensive.py" + "tests/docker/test_hooks_utility.py" + "tests/docker/test_llm_params.py" + "tests/docker/test_rest_api_deep_crawl.py" + "tests/docker/test_server.py" + "tests/docker/test_server_requests.py" + "tests/docker/test_server_token.py" + "tests/general/test_async_crawler_strategy.py" + "tests/general/test_async_url_seeder_bm25.py" + "tests/general/test_async_webcrawler.py" + "tests/general/test_bff_scoring.py" + "tests/general/test_cache_context.py" + "tests/general/test_crawlers.py" + "tests/general/test_deep_crawl_filters.py" + "tests/general/test_download_file.py" + "tests/general/test_http_crawler_strategy.py" + "tests/general/test_llm_filter.py" + "tests/general/test_max_scroll.py" + "tests/general/test_mhtml.py" + "tests/general/test_schema_builder.py" + "tests/mcp/" + "tests/memory/test_docker_config_gen.py" + "tests/integration/test_domain_mapper_e2e.py" + "tests/general/test_network_console_capture.py" + "tests/general/test_robot_parser.py" + "tests/general/test_stream.py" + "tests/general/test_stream_dispatch.py" + "tests/proxy/" + "tests/regression/" + "tests/releases/" + "tests/test_arun_many.py" + "tests/test_cdp_changes.py" + "tests/test_cli_docs.py" + "tests/test_config_selection.py" + "tests/test_docker.py" + "tests/test_docker_api_with_llm_provider.py" + "tests/test_eval_security_adversarial.py" + "tests/test_issue_1594_mcp_sse.py" + "tests/test_issue_1611_llm_provider.py" + "tests/test_issue_1748_screenshot_scroll_delay.py" + "tests/test_issue_1750_screenshot_scan_full_page.py" + "tests/test_issue_1850_mcp_sse.py" + "tests/test_link_extractor.py" + "tests/test_llm_extraction_parallel_issue_1055.py" + "tests/test_llm_simple_url.py" + "tests/test_llmtxt.py" + "tests/test_main.py" + "tests/test_multi_config.py" + "tests/test_prefetch_integration.py" + "tests/test_prefetch_regression.py" + "tests/test_pr_1435_redirected_status_code.py" + "tests/test_pr_1463_device_scale_factor.py" + "tests/test_pyopenssl_update.py" + "tests/test_raw_html_browser.py" + "tests/test_raw_html_edge_cases.py" + "tests/test_raw_html_redirected_url.py" + "tests/test_scraping_strategy.py" + "tests/test_virtual_scroll.py" + "tests/test_web_crawler.py" + ]; + + disabledTests = [ + # Tests require network access + "test_client_is_built_once_and_reused" + "test_reused_client_extracts_from_multiple_urls" + "test_clones_share_one_client" + "test_reused_client_checks_multiple_urls" + "test_concurrent_host_scanning" + "test_domain_with_scheme" + "test_probe_without_crt" + "test_examples" + "test_missing_url" + "test_basic_crawl" + # Tests require LLM API + "test_map_query_uses_query_config" + "test_legacy_single_config_for_query" + # Assertions Errors + "allowed_types5" + "allowed_types16" + "test_empty_href" + "test_href_is_only_fragment" + "test_href_with_fragment" + "test_invalid_base_url_netloc" + "test_invalid_base_url_scheme" + # Test checks GitHub Actions version + "test_no_v4_or_v5_checkout_remaining" + ]; + + pythonImportsCheck = [ "crawl4ai" ]; + + meta = { + description = "LLM Friendly Web Crawler & Scraper"; + homepage = "https://github.com/unclecode/crawl4ai"; + changelog = "https://github.com/unclecode/crawl4ai/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 01b95ac9839e..291a445b99ef 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3400,6 +3400,8 @@ self: super: with self; { crate = callPackage ../development/python-modules/crate { }; + crawl4ai = callPackage ../development/python-modules/crawl4ai { }; + crayons = callPackage ../development/python-modules/crayons { }; crc = callPackage ../development/python-modules/crc { };