1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 setuptools-scm,
7 matplotlib,
8 mplhep-data,
9 numpy,
10 packaging,
11 uhi,
12 pytestCheckHook,
13 scipy,
14 pytest-mpl,
15 pytest-mock,
16 uproot,
17 hist,
18}:
19
20buildPythonPackage rec {
21 pname = "mplhep";
22 version = "0.3.52";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "scikit-hep";
27 repo = "mplhep";
28 rev = "refs/tags/v${version}";
29 hash = "sha256-fcc/DG4irTvAOjCGAW7hW96z0yJNSvcpanfDGN9H9XI=";
30 };
31
32 build-system = [
33 setuptools
34 setuptools-scm
35 ];
36
37 dependencies = [
38 matplotlib
39 mplhep-data
40 numpy
41 packaging
42 uhi
43 ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 scipy
48 pytest-mpl
49 pytest-mock
50 uproot
51 hist
52 ];
53
54 disabledTests = [
55 # requires uproot4
56 "test_inputs_uproot"
57 "test_uproot_versions"
58 ];
59
60 pythonImportsCheck = [ "mplhep" ];
61
62 meta = {
63 description = "Extended histogram plots on top of matplotlib and HEP compatible styling similar to current collaboration requirements (ROOT)";
64 homepage = "https://github.com/scikit-hep/mplhep";
65 license = with lib.licenses; [ mit ];
66 maintainers = with lib.maintainers; [ veprbl ];
67 };
68}