diff --git a/pkgs/development/python-modules/hcipy/default.nix b/pkgs/development/python-modules/hcipy/default.nix new file mode 100644 index 00000000000000..a036cd59087315 --- /dev/null +++ b/pkgs/development/python-modules/hcipy/default.nix @@ -0,0 +1,75 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + pythonOlder, + + # build-system + setuptools-scm, + + # dependencies + numpy, + scipy, + matplotlib, + pillow, + pyyaml, + astropy, + imageio, + xxhash, + numexpr, + asdf, + importlib-resources, + + # tests + pytest, + pytest-cov, + pytestCheckHook, + mpmath, + dill, + flake8, +}: + +buildPythonPackage rec { + pname = "hcipy"; + version = "0.6.0"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-Kt2T6EgCrPTJGiygjmFUh1HH1DthFcZ2mMlnlu0HxsE="; + }; + + build-system = [ setuptools-scm ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]; + + dependencies = [ + numpy + scipy + matplotlib + pillow + pyyaml + astropy + imageio + xxhash + numexpr + asdf + ]; + + pythonImportsCheck = [ "hcipy" ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest + pytest-cov + mpmath + dill + flake8 + ]; + + meta = { + description = "Framework for performing optical propagation simulations, meant for high contrast imaging."; + changelog = "https://github.com/ehpor/hcipy/blob/master/doc/changelog.rst"; + homepage = "https://hcipy.org/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ BarrOff ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 704a4b4e87b259..0475da501ab501 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5561,6 +5561,8 @@ self: super: with self; { haystack-ai = callPackage ../development/python-modules/haystack-ai { }; + hcipy = callPackage ../development/python-modules/hcipy { }; + hcloud = callPackage ../development/python-modules/hcloud { }; hcs-utils = callPackage ../development/python-modules/hcs-utils { };