diff options
| -rw-r--r-- | pkgs/development/python-modules/mplhep/default.nix | 63 | ||||
| -rw-r--r-- | pkgs/top-level/python-packages.nix | 4 |
2 files changed, 66 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/mplhep/default.nix b/pkgs/development/python-modules/mplhep/default.nix new file mode 100644 index 000000000000..63a81c47e303 --- /dev/null +++ b/pkgs/development/python-modules/mplhep/default.nix @@ -0,0 +1,63 @@ +{ lib +, buildPythonPackage +, fetchPypi +, hist +, matplotlib +, mplhep-data +, pytestCheckHook +, pytest-mock +, pytest-mpl +, scipy +, setuptools +, setuptools-scm +, uhi +, uproot +}: + +buildPythonPackage rec { + pname = "mplhep"; + version = "0.3.28"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-/7nfjIdlYoouDOI1vXdr9BSml5gpE0gad7ONAUmOCiE="; + }; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + propagatedBuildInputs = [ + matplotlib + uhi + mplhep-data + ]; + + nativeCheckInputs = [ + hist + pytestCheckHook + pytest-mock + pytest-mpl + scipy + uproot + ]; + + disabledTests = [ + # requires uproot4 + "test_inputs_uproot" + "test_uproot_versions" + ]; + + pythonImportsCheck = [ + "mplhep" + ]; + + meta = with lib; { + description = "Extended histogram plots on top of matplotlib and HEP compatible styling similar to current collaboration requirements (ROOT)"; + homepage = "https://github.com/scikit-hep/mplhep"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fe7d2833bd3b..1db525e13086 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6494,7 +6494,9 @@ self: super: with self; { mplfinance = callPackage ../development/python-modules/mplfinance { }; - mplhep_data = callPackage ../development/python-modules/mplhep_data { }; + mplhep = callPackage ../development/python-modules/mplhep { }; + + mplhep-data = callPackage ../development/python-modules/mplhep-data { }; mplleaflet = callPackage ../development/python-modules/mplleaflet { }; |
