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.3.59";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "scikit-hep";
33 repo = "mplhep";
34 tag = "v${version}";
35 hash = "sha256-Xanj2AkFRq/zu2ntTHVt1QkikN0bYfRcBj6CBho15os=";
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 disabledTests = [
61 # requires uproot4
62 "test_inputs_uproot"
63 "test_uproot_versions"
64 ];
65
66 pythonImportsCheck = [ "mplhep" ];
67
68 meta = {
69 description = "Extended histogram plots on top of matplotlib and HEP compatible styling similar to current collaboration requirements (ROOT)";
70 homepage = "https://github.com/scikit-hep/mplhep";
71 changelog = "https://github.com/scikit-hep/mplhep/releases/tag/${src.tag}";
72 license = with lib.licenses; [ mit ];
73 maintainers = with lib.maintainers; [ veprbl ];
74 };
75}