From b19f4100e3e8040c6b6911cf76649c65dac67187 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 20 Feb 2026 12:24:37 +0200 Subject: [PATCH 1/7] zarr: reenable bulk updates Not sure exactly how bulk updates got disabled after https://github.com/NixOS/nixpkgs/pull/380002 and https://github.com/NixOS/nixpkgs/pull/373248 --- pkgs/development/python-modules/zarr/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix index 755d64cc780d..3031229cc769 100644 --- a/pkgs/development/python-modules/zarr/default.nix +++ b/pkgs/development/python-modules/zarr/default.nix @@ -61,9 +61,6 @@ buildPythonPackage rec { pythonImportsCheck = [ "zarr" ]; - # FIXME remove once zarr's reverse dependencies support v3 - passthru.skipBulkUpdate = true; - meta = { description = "Implementation of chunked, compressed, N-dimensional arrays for Python"; homepage = "https://github.com/zarr-developers/zarr"; From bb2a973a3475a03fe47e8279df77c8b60a30a249 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 20 Feb 2026 12:55:15 +0200 Subject: [PATCH 2/7] python3.pkgs.zarr: use finalAttrs --- pkgs/development/python-modules/zarr/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix index 3031229cc769..a5f9cc9b3360 100644 --- a/pkgs/development/python-modules/zarr/default.nix +++ b/pkgs/development/python-modules/zarr/default.nix @@ -22,13 +22,13 @@ tomlkit, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "zarr"; version = "3.1.1"; pyproject = true; src = fetchPypi { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-F9ty838kiUUtITesiRxBM7j5dvkYnY79PnXzs63YTow="; }; @@ -64,8 +64,8 @@ buildPythonPackage rec { meta = { description = "Implementation of chunked, compressed, N-dimensional arrays for Python"; homepage = "https://github.com/zarr-developers/zarr"; - changelog = "https://github.com/zarr-developers/zarr-python/releases/tag/v${version}"; + changelog = "https://github.com/zarr-developers/zarr-python/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ doronbehar ]; }; -} +}) From 702fbbbf9854199975cb6eabb1eb8e3892f06e06 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 20 Feb 2026 12:57:38 +0200 Subject: [PATCH 3/7] python3.pkgs.zarr: use fetchFromGitHub --- pkgs/development/python-modules/zarr/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix index a5f9cc9b3360..d54f63433b3f 100644 --- a/pkgs/development/python-modules/zarr/default.nix +++ b/pkgs/development/python-modules/zarr/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, # build-system hatchling, @@ -27,9 +27,11 @@ buildPythonPackage (finalAttrs: { version = "3.1.1"; pyproject = true; - src = fetchPypi { - inherit (finalAttrs) pname version; - hash = "sha256-F9ty838kiUUtITesiRxBM7j5dvkYnY79PnXzs63YTow="; + src = fetchFromGitHub { + owner = "zarr-developers"; + repo = "zarr-python"; + tag = "v${finalAttrs.version}"; + hash = "sha256-/rDKfu0KTYBU2lxZAwQ7eOUw9ivgklil5Yhb5rv1uiw="; }; build-system = [ From c9406b32fcfde835c1d62bb4ff1ea2c1357b4010 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 20 Feb 2026 15:13:54 +0200 Subject: [PATCH 4/7] python3.pkgs.zarr: disable accurately the failing uv test --- pkgs/development/python-modules/zarr/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix index d54f63433b3f..f019a0156ddf 100644 --- a/pkgs/development/python-modules/zarr/default.nix +++ b/pkgs/development/python-modules/zarr/default.nix @@ -58,7 +58,7 @@ buildPythonPackage (finalAttrs: { disabledTestPaths = [ # requires uv and then fails at setting up python envs - "tests/test_examples.py" + "tests/test_examples.py::test_scripts_can_run[script_path0]" ]; pythonImportsCheck = [ "zarr" ]; From a196f4588f6d2b1d310ee613f209ab0cf56290de Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 20 Feb 2026 15:36:29 +0200 Subject: [PATCH 5/7] python3.pkgs.zarr: add full passthru.optional-dependencies --- .../python-modules/zarr/default.nix | 97 ++++++++++++++++++- 1 file changed, 93 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix index f019a0156ddf..872d764174c8 100644 --- a/pkgs/development/python-modules/zarr/default.nix +++ b/pkgs/development/python-modules/zarr/default.nix @@ -14,12 +14,42 @@ packaging, typing-extensions, - # tests - hypothesis, - pytest-asyncio, - pytest-xdist, + # optional-dependencies + # remote + fsspec, + obstore ? null, # TODO: Package + # gpu + cupy, + # test pytestCheckHook, + pytest-asyncio, + pytest-cov, + pytest-accept ? null, # TODO: Package + rich, + mypy, + hypothesis, + pytest-xdist, tomlkit, + uv, + # remote_tests + botocore, + s3fs, + moto, + requests, + # optional + universal-pathlib, + # docs + sphinx, + sphinx-autobuild, + sphinx-autoapi, + sphinx-design, + sphinx-issues, + sphinx-copybutton, + sphinx-reredirects, + pydata-sphinx-theme, + numpydoc, + towncrier, + astroid, }: buildPythonPackage (finalAttrs: { @@ -48,6 +78,65 @@ buildPythonPackage (finalAttrs: { ] ++ numcodecs.optional-dependencies.crc32c; + passthru = { + optional-dependencies = { + remote = [ + fsspec + obstore + ]; + gpu = [ + cupy + ]; + # Development extras + test = [ + #pytest + pytest-asyncio + pytest-cov + pytest-accept + rich + mypy + hypothesis + # From some reason the existence of pytest-xdist makes the tests fail + # depending on $NIX_BUILD_CORES + #pytest-xdist + packaging + tomlkit + uv + ]; + remote_tests = [ + botocore + s3fs + moto + requests + ] + ++ moto.optional-dependencies.server + ++ moto.optional-dependencies.s3; + optional = [ + rich + universal-pathlib + ]; + docs = [ + # Doc building + sphinx + sphinx-autobuild + sphinx-autoapi + sphinx-design + sphinx-issues + sphinx-copybutton + sphinx-reredirects + pydata-sphinx-theme + numpydoc + towncrier # Changelog generation + # Optional dependencies to run examples + rich + s3fs + astroid + #pytest + ] + ++ numcodecs.optional-dependencies.msgpack; + }; + }; + nativeCheckInputs = [ hypothesis pytest-asyncio From 53b55a842af440f20b6fabd11f96e21661c625e8 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 20 Feb 2026 15:39:16 +0200 Subject: [PATCH 6/7] python3.pkgs.zarr: use optional-dependencies.test for nativeCheckInputs The existence of several more dependencies triggers `test_regression` which fail because they require somehow `zarr==2.x`. --- pkgs/development/python-modules/zarr/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix index 872d764174c8..688e4fd51be6 100644 --- a/pkgs/development/python-modules/zarr/default.nix +++ b/pkgs/development/python-modules/zarr/default.nix @@ -138,16 +138,18 @@ buildPythonPackage (finalAttrs: { }; nativeCheckInputs = [ - hypothesis - pytest-asyncio - pytest-xdist pytestCheckHook - tomlkit - ]; + ] + # Not adding `passthru.optional-dependencies.remote{,_tests}` since the + # existence of these Python modules triggers tests that fail in the sandbox + # due to failed network requests. + ++ finalAttrs.finalPackage.passthru.optional-dependencies.test; disabledTestPaths = [ # requires uv and then fails at setting up python envs "tests/test_examples.py::test_scripts_can_run[script_path0]" + # Requires zarr==2.x to generate zarr stores for the tests + "tests/test_regression" ]; pythonImportsCheck = [ "zarr" ]; From 83dc40f93b68d1827e24e8405325894020aee56c Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 20 Feb 2026 15:40:59 +0200 Subject: [PATCH 7/7] python3.pkgs.zarr: 3.1.1 -> 3.1.5 Diff: https://github.com/zarr-developers/zarr-python/compare/v3.1.1...v3.1.5 Changelog: https://github.com/zarr-developers/zarr-python/releases/tag/v3.1.5 --- .../python-modules/zarr/default.nix | 55 +++++++++++-------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/pkgs/development/python-modules/zarr/default.nix b/pkgs/development/python-modules/zarr/default.nix index 688e4fd51be6..b7f738c1d92c 100644 --- a/pkgs/development/python-modules/zarr/default.nix +++ b/pkgs/development/python-modules/zarr/default.nix @@ -11,6 +11,7 @@ donfig, numpy, numcodecs, + google-crc32c, packaging, typing-extensions, @@ -20,6 +21,8 @@ obstore ? null, # TODO: Package # gpu cupy, + # cli + typer, # test pytestCheckHook, pytest-asyncio, @@ -27,6 +30,7 @@ pytest-accept ? null, # TODO: Package rich, mypy, + numpydoc, hypothesis, pytest-xdist, tomlkit, @@ -39,29 +43,29 @@ # optional universal-pathlib, # docs - sphinx, - sphinx-autobuild, - sphinx-autoapi, - sphinx-design, - sphinx-issues, - sphinx-copybutton, - sphinx-reredirects, - pydata-sphinx-theme, - numpydoc, + mkdocs-material, + mkdocs, + mkdocstrings, + mkdocstrings-python, + mike, + mkdocs-redirects, + markdown-exec ? null, # TODO: Package + griffe-inherited-docstrings ? null, # TODO: Package, + ruff, towncrier, astroid, }: buildPythonPackage (finalAttrs: { pname = "zarr"; - version = "3.1.1"; + version = "3.1.5"; pyproject = true; src = fetchFromGitHub { owner = "zarr-developers"; repo = "zarr-python"; tag = "v${finalAttrs.version}"; - hash = "sha256-/rDKfu0KTYBU2lxZAwQ7eOUw9ivgklil5Yhb5rv1uiw="; + hash = "sha256-1Kx8gN1JiaY4eHmwpdilvJ8+NdnzxhDvn7YZjphgtZw="; }; build-system = [ @@ -72,11 +76,11 @@ buildPythonPackage (finalAttrs: { dependencies = [ donfig numcodecs + google-crc32c numpy packaging typing-extensions - ] - ++ numcodecs.optional-dependencies.crc32c; + ]; passthru = { optional-dependencies = { @@ -87,6 +91,9 @@ buildPythonPackage (finalAttrs: { gpu = [ cupy ]; + cli = [ + typer + ]; # Development extras test = [ #pytest @@ -95,6 +102,7 @@ buildPythonPackage (finalAttrs: { pytest-accept rich mypy + numpydoc hypothesis # From some reason the existence of pytest-xdist makes the tests fail # depending on $NIX_BUILD_CORES @@ -117,15 +125,15 @@ buildPythonPackage (finalAttrs: { ]; docs = [ # Doc building - sphinx - sphinx-autobuild - sphinx-autoapi - sphinx-design - sphinx-issues - sphinx-copybutton - sphinx-reredirects - pydata-sphinx-theme - numpydoc + mkdocs-material + mkdocs + mkdocstrings + mkdocstrings-python + mike + mkdocs-redirects + markdown-exec + griffe-inherited-docstrings + ruff towncrier # Changelog generation # Optional dependencies to run examples rich @@ -133,6 +141,8 @@ buildPythonPackage (finalAttrs: { astroid #pytest ] + ++ mkdocs-material.optional-dependencies.imaging + ++ markdown-exec.optional-dependencies.ansi ++ numcodecs.optional-dependencies.msgpack; }; }; @@ -140,6 +150,7 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ pytestCheckHook ] + ++ finalAttrs.finalPackage.passthru.optional-dependencies.cli # Not adding `passthru.optional-dependencies.remote{,_tests}` since the # existence of these Python modules triggers tests that fail in the sandbox # due to failed network requests.