nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8 hatch-vcs,
9
10 # dependencies
11 aiohttp,
12 awkward,
13 cachetools,
14 cloudpickle,
15 correctionlib,
16 dask,
17 dask-awkward,
18 dask-histogram,
19 fsspec,
20 hist,
21 ipywidgets,
22 lz4,
23 matplotlib,
24 mplhep,
25 numba,
26 numpy,
27 packaging,
28 pandas,
29 pyarrow,
30 requests,
31 rich,
32 scipy,
33 toml,
34 tqdm,
35 uproot,
36 vector,
37
38 # tests
39 distributed,
40 pyinstrument,
41 pytest-xdist,
42 pytestCheckHook,
43}:
44
45buildPythonPackage rec {
46 pname = "coffea";
47 version = "2025.12.0";
48 pyproject = true;
49
50 src = fetchFromGitHub {
51 owner = "CoffeaTeam";
52 repo = "coffea";
53 tag = "v${version}";
54 hash = "sha256-+Qfb5NHJTlSBUqyv+n3zebEwAZPB9+UMV5KiQhOxJSY=";
55 };
56
57 build-system = [
58 hatchling
59 hatch-vcs
60 ];
61
62 pythonRelaxDeps = [
63 "dask"
64 ];
65
66 dependencies = [
67 aiohttp
68 awkward
69 cachetools
70 cloudpickle
71 correctionlib
72 dask
73 dask-awkward
74 dask-histogram
75 fsspec
76 hist
77 ipywidgets
78 lz4
79 matplotlib
80 mplhep
81 numba
82 numpy
83 packaging
84 pandas
85 pyarrow
86 requests
87 rich
88 scipy
89 toml
90 tqdm
91 uproot
92 vector
93 ]
94 ++ dask.optional-dependencies.array;
95
96 nativeCheckInputs = [
97 distributed
98 pyinstrument
99 pytest-xdist
100 pytestCheckHook
101 ];
102
103 pythonImportsCheck = [ "coffea" ];
104
105 disabledTests = [
106 # Requires internet access
107 # https://github.com/CoffeaTeam/coffea/issues/1094
108 "test_lumimask"
109
110 # Flaky: FileNotFoundError: [Errno 2] No such file or directory
111 # https://github.com/scikit-hep/coffea/issues/1246
112 "test_packed_selection_cutflow_dak" # cutflow.npz
113 "test_packed_selection_nminusone_dak" # nminusone.npz
114 ];
115
116 __darwinAllowLocalNetworking = true;
117
118 meta = {
119 description = "Basic tools and wrappers for enabling not-too-alien syntax when running columnar Collider HEP analysis";
120 homepage = "https://github.com/CoffeaTeam/coffea";
121 changelog = "https://github.com/CoffeaTeam/coffea/releases/tag/${src.tag}";
122 license = with lib.licenses; [ bsd3 ];
123 maintainers = with lib.maintainers; [ veprbl ];
124 };
125}