Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions pkgs/development/python-modules/mplhep-data/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, setuptools-scm
}:

buildPythonPackage rec {
pname = "mplhep-data";
version = "0.0.3";
format = "pyproject";

src = fetchPypi {
pname = "mplhep_data";
inherit version;
hash = "sha256-tU0lfz9TyTpELNp6ZoHOJnJ34JFzwLQf14gg94Mhdy8=";
};

nativeBuildInputs = [
setuptools
setuptools-scm
];

pythonImportsCheck = [
"mplhep_data"
];

meta = with lib; {
description = "Sub-package to hold data (fonts) for mplhep";
homepage = "https://github.com/scikit-hep/mplhep_data";
license = with licenses; [ mit gfl ofl ];
maintainers = with maintainers; [ veprbl ];
};
}
63 changes: 63 additions & 0 deletions pkgs/development/python-modules/mplhep/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6494,6 +6494,10 @@ self: super: with self; {

mplfinance = callPackage ../development/python-modules/mplfinance { };

mplhep = callPackage ../development/python-modules/mplhep { };

mplhep-data = callPackage ../development/python-modules/mplhep-data { };

mplleaflet = callPackage ../development/python-modules/mplleaflet { };

mpmath = callPackage ../development/python-modules/mpmath { };
Expand Down