diff --git a/pkgs/development/python-modules/pint-xarray/default.nix b/pkgs/development/python-modules/pint-xarray/default.nix new file mode 100644 index 000000000000..5d38fa108940 --- /dev/null +++ b/pkgs/development/python-modules/pint-xarray/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + setuptools-scm, + numpy, + pint, + xarray, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "pint-xarray"; + version = "0.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "xarray-contrib"; + repo = "pint-xarray"; + tag = "v${version}"; + hash = "sha256-IFHSgrnqS7ZpNhRzzSgHPRUP90WNv84jBH4um/DRMCU="; + }; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + numpy + pint + xarray + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pint_xarray" + ]; + + meta = { + description = "Interface for using pint with xarray, providing convenience accessors"; + homepage = "https://github.com/xarray-contrib/pint-xarray"; + changelog = "https://github.com/xarray-contrib/pint-xarray/blob/v${version}/docs/whats-new.rst"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ doronbehar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 54ea65a96643..0d64801ea78c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10451,6 +10451,8 @@ self: super: with self; { pint-pandas = callPackage ../development/python-modules/pint-pandas { }; + pint-xarray = callPackage ../development/python-modules/pint-xarray { }; + pip = callPackage ../development/python-modules/pip { }; pipdate = callPackage ../development/python-modules/pipdate { };