1{ lib
2, buildPythonPackage
3, fetchPypi
4, cmake
5, numpy
6, scikit-build
7, setuptools
8, setuptools-scm
9, wheel
10, pybind11
11, pydantic
12, rich
13, awkward
14, pytestCheckHook
15, scipy
16, zlib
17}:
18
19buildPythonPackage rec {
20 pname = "correctionlib";
21 version = "2.4.0";
22 pyproject = true;
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-bQKcS8vktvD62zvSeaBtoJw36TSpo0gEpKm0HI3AuXg=";
27 };
28
29 nativeBuildInputs = [
30 cmake
31 numpy
32 scikit-build
33 setuptools
34 setuptools-scm
35 wheel
36 pybind11
37 ];
38
39 buildInputs = [
40 zlib
41 ];
42
43 propagatedBuildInputs = [
44 pydantic
45 rich
46 ];
47
48 dontUseCmakeConfigure = true;
49
50 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
51
52 nativeCheckInputs = [
53 awkward
54 pytestCheckHook
55 scipy
56 ];
57
58 pythonImportsCheck = [
59 "correctionlib"
60 ];
61
62 meta = with lib; {
63 description = "Provides a well-structured JSON data format for a wide variety of ad-hoc correction factors encountered in a typical HEP analysis";
64 homepage = "https://cms-nanoaod.github.io/correctionlib/";
65 license = with licenses; [ bsd3 ];
66 maintainers = with maintainers; [ veprbl ];
67 };
68}