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