diff --git a/pkgs/development/python-modules/hist/default.nix b/pkgs/development/python-modules/hist/default.nix new file mode 100644 index 000000000000..df7f447a0444 --- /dev/null +++ b/pkgs/development/python-modules/hist/default.nix @@ -0,0 +1,45 @@ +{ lib +, fetchPypi +, buildPythonPackage +, boost-histogram +, histoprint +, hatchling +, hatch-vcs +, numpy +, pytestCheckHook +, pytest-mpl +}: + +buildPythonPackage rec { + pname = "hist"; + version = "2.6.3"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + sha256 = "dede097733d50b273af9f67386e6dcccaab77e900ae702e1a9408a856e217ce9"; + }; + + buildInputs = [ + hatchling + hatch-vcs + ]; + + propagatedBuildInputs = [ + boost-histogram + histoprint + numpy + ]; + + checkInputs = [ + pytestCheckHook + pytest-mpl + ]; + + meta = with lib; { + description = "Histogramming for analysis powered by boost-histogram"; + homepage = "https://hist.readthedocs.io/en/latest/"; + license = licenses.bsd3; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/development/python-modules/histoprint/default.nix b/pkgs/development/python-modules/histoprint/default.nix new file mode 100644 index 000000000000..3c65fbf0eb80 --- /dev/null +++ b/pkgs/development/python-modules/histoprint/default.nix @@ -0,0 +1,45 @@ +{ lib +, fetchPypi +, buildPythonPackage +, click +, numpy +, setuptools +, setuptools-scm +, uhi +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "histoprint"; + version = "2.4.0"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + sha256 = "328f789d186e3bd76882d57b5aad3fa08c7870a856cc83bcdbad9f4aefbda94d"; + }; + + buildInputs = [ + setuptools + setuptools-scm + ]; + + propagatedBuildInputs = [ + click + numpy + uhi + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Pretty print histograms to the console"; + homepage = "https://github.com/scikit-hep/histoprint"; + license = licenses.mit; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/development/python-modules/uhi/default.nix b/pkgs/development/python-modules/uhi/default.nix new file mode 100644 index 000000000000..948f2108d261 --- /dev/null +++ b/pkgs/development/python-modules/uhi/default.nix @@ -0,0 +1,39 @@ +{ lib +, fetchPypi +, buildPythonPackage +, hatchling +, hatch-vcs +, numpy +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "uhi"; + version = "0.3.3"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + sha256 = "800caf3a5f1273b08bcc3bb4b49228fe003942e23423812b0110546aad9a24be"; + }; + + buildInputs = [ + hatchling + hatch-vcs + ]; + + propagatedBuildInputs = [ + numpy + ]; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Universal Histogram Interface"; + homepage = "https://uhi.readthedocs.io/"; + license = licenses.bsd3; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b5f87726d81e..af62aa1ebd3d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4338,6 +4338,10 @@ self: super: with self; { hiro = callPackage ../development/python-modules/hiro { }; + hist = callPackage ../development/python-modules/hist { }; + + histoprint = callPackage ../development/python-modules/histoprint { }; + hiyapyco = callPackage ../development/python-modules/hiyapyco { }; hjson = callPackage ../development/python-modules/hjson { }; @@ -11901,6 +11905,8 @@ self: super: with self; { inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices; }; + uhi = callPackage ../development/python-modules/uhi { }; + ujson = callPackage ../development/python-modules/ujson { }; ukkonen = callPackage ../development/python-modules/ukkonen { };