From aa5a815549e16918a6dc394e06fad92fc1001e75 Mon Sep 17 00:00:00 2001 From: BarrOff <58253563+BarrOff@users.noreply.github.com> Date: Sat, 14 Sep 2024 21:20:47 +0200 Subject: [PATCH] python3Packages.hcipy: init at 0.6.0 --- .../python-modules/hcipy/default.nix | 76 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 78 insertions(+) create mode 100644 pkgs/development/python-modules/hcipy/default.nix diff --git a/pkgs/development/python-modules/hcipy/default.nix b/pkgs/development/python-modules/hcipy/default.nix new file mode 100644 index 0000000000000..ac9b4b973ee62 --- /dev/null +++ b/pkgs/development/python-modules/hcipy/default.nix @@ -0,0 +1,76 @@ +{ + lib, + stdenv, + buildPythonPackage, + fetchPypi, + + # build-system + setuptools, + setuptools-scm, + + # dependencies + numpy, + scipy, + matplotlib, + pillow, + pyyaml, + astropy, + imageio, + xxhash, + numexpr, + asdf, + + # tests + pytest-cov-stub, + pytestCheckHook, + mpmath, + dill, +}: + +buildPythonPackage rec { + pname = "hcipy"; + version = "0.6.0"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-Kt2T6EgCrPTJGiygjmFUh1HH1DthFcZ2mMlnlu0HxsE="; + }; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + numpy + scipy + matplotlib + pillow + pyyaml + astropy + imageio + xxhash + numexpr + asdf + ]; + + pythonImportsCheck = [ "hcipy" ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + mpmath + dill + ]; + + 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 ]; + # seems to be broken on arm, see: https://github.com/NixOS/nixpkgs/pull/341906 + broken = stdenv.isAarch64; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 704a4b4e87b25..0475da501ab50 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 { };