nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8 setuptools-scm,
9
10 # dependencies
11 dask,
12 numpy,
13 scipy,
14 pandas,
15 pims,
16
17 # tests
18 pyarrow,
19 pytestCheckHook,
20 scikit-image,
21}:
22
23buildPythonPackage rec {
24 pname = "dask-image";
25 version = "2025.11.0";
26 pyproject = true;
27
28 src = fetchFromGitHub {
29 owner = "dask";
30 repo = "dask-image";
31 tag = "v${version}";
32 hash = "sha256-+nzYthnobcemunMcAWwRpHOQy6yFtjdib/7VZqWEiqc=";
33 };
34
35 postPatch = ''
36 sed -i "/--flake8/d" pyproject.toml
37
38 # https://numpy.org/doc/stable//release/2.4.0-notes.html#removed-numpy-in1d
39 substituteInPlace tests/test_dask_image/test_ndmeasure/test_core.py \
40 --replace-fail "np.in1d" "np.isin"
41 '';
42
43 build-system = [
44 setuptools
45 setuptools-scm
46 ];
47
48 dependencies = [
49 dask
50 numpy
51 scipy
52 pandas
53 pims
54 ];
55
56 nativeCheckInputs = [
57 pyarrow
58 pytestCheckHook
59 scikit-image
60 ];
61
62 pythonImportsCheck = [ "dask_image" ];
63
64 disabledTests = [
65 # The following tests are from 'tests/test_dask_image/test_ndmeasure/test_find_objects.py' and
66 # fail because of errors on numpy slices
67 # AttributeError: 'str' object has no attribute 'start'
68 "test_find_objects"
69 "test_3d_find_objects"
70
71 # AssertionError (comparing slices)
72 "test_find_objects_with_empty_chunks"
73
74 # scipy compat issue
75 # TypeError: only 0-dimensional arrays can be converted to Python scalars
76 "test_generic_filter_identity"
77 "test_generic_filter_comprehensions"
78 ];
79
80 meta = {
81 description = "Distributed image processing";
82 homepage = "https://github.com/dask/dask-image";
83 changelog = "https://github.com/dask/dask-image/releases/tag/v${version}";
84 license = lib.licenses.bsdOriginal;
85 maintainers = with lib.maintainers; [ GaetanLepage ];
86 };
87}