about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/correctionlib/default.nix
blob: e378b71b43b831ef3c6af57183a7a0fc18a707d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{ lib
, buildPythonPackage
, fetchPypi
, cmake
, numpy
, scikit-build
, setuptools
, setuptools-scm
, wheel
, packaging
, pybind11
, pydantic
, rich
, awkward
, pytestCheckHook
, scipy
, zlib
}:

buildPythonPackage rec {
  pname = "correctionlib";
  version = "2.5.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-H8QCdU6piBdqJEJOGVbsz+6eyMhFVuwTpIHKUoKaf4A=";
  };

  nativeBuildInputs = [
    cmake
    scikit-build
    setuptools
    setuptools-scm
    pybind11
  ];

  buildInputs = [
    zlib
  ];

  propagatedBuildInputs = [
    numpy
    packaging
    pydantic
    rich
  ];

  dontUseCmakeConfigure = true;

  nativeCheckInputs = [
    awkward
    pytestCheckHook
    scipy
  ];

  pythonImportsCheck = [
    "correctionlib"
  ];

  meta = with lib; {
    description = "Provides a well-structured JSON data format for a wide variety of ad-hoc correction factors encountered in a typical HEP analysis";
    homepage = "https://cms-nanoaod.github.io/correctionlib/";
    license = with licenses; [ bsd3 ];
    maintainers = with maintainers; [ veprbl ];
  };
}