···4747 pytest = callPackage ./tests.nix { };
4848 };
49495050- meta = with lib; {
5050+ meta = {
5151 description = "Shared components of the Linien spectroscopy lock application";
5252 homepage = "https://github.com/linien-org/linien/tree/develop/linien-common";
5353 changelog = "https://github.com/linien-org/linien/blob/v${version}/CHANGELOG.md";
5454- license = licenses.gpl3Plus;
5555- maintainers = with maintainers; [
5454+ license = lib.licenses.gpl3Plus;
5555+ maintainers = with lib.maintainers; [
5656 fsagbuya
5757 doronbehar
5858 ];
5959+ # Numpy 2 is not supported yet, because the server linien, (installed on the
6060+ # RedPitaya) must use the same Numpy version as the client (installed with
6161+ # Nix). The server linien is bound to use Numpy 1 because Numpy maintainers
6262+ # don't distribute pre-built wheels for the armv7l architecture of
6363+ # RedPitaya, and it is unfeasible to build it natively there - something
6464+ # that `pip install numpy` naively tries to do. Hence, we are bound to use
6565+ # on the server the preinstalled Numpy 1 sourced in the .deb package that
6666+ # comes with the RedPitaya OS. See also:
6767+ #
6868+ # - https://github.com/linien-org/linien/commit/ebbb2276b500a18826d11893bb43699b65692c5e
6969+ # - https://github.com/linien-org/linien/issues/377
7070+ #
7171+ # To evaluate this package with python3.withPackages, use:
7272+ #
7373+ # pythonEnv = pkgs.linien-gui.passthru.python.withPackages(ps: {
7474+ # ps.linien-common
7575+ # # Other packages...
7676+ # });
7777+ #
7878+ # NOTE that the above Python environment will use Numpy 1 throughout all
7979+ # packages wrapped there (see expression in linien-gui), and this may
8080+ # trigger rebuilds for dependencies that depend on Numpy too. Be ready to
8181+ # also add more `packageOverrides` to make sure these other dependencies do
8282+ # build with numpy_1.
8383+ #
8484+ # Last NOTE: If you need more packageOverrides besides those provided in
8585+ # the `linien-gui` expression, beware of:
8686+ #
8787+ # - https://github.com/NixOS/nixpkgs/issues/44426
8888+ broken = lib.versionAtLeast numpy.version "2";
5989 };
6090}
···8484 })
8585 ];
86868787+ # A NOTE regarding the Numpy version relaxing: Both Numpy versions 1.x &
8888+ # 2.x are supported. However upstream wants to always build with Numpy 2,
8989+ # and with it to still be able to run with a Numpy 1 or 2. We insist to
9090+ # perform this substitution even though python3.pkgs.numpy is of version 2
9191+ # nowadays, because our ecosystem unfortunately doesn't allow easily
9292+ # separating runtime and build-system dependencies. See also:
9393+ #
9494+ # https://discourse.nixos.org/t/several-comments-about-priorities-and-new-policies-in-the-python-ecosystem/51790
9595+ #
9696+ # Being able to build (& run) with Numpy 1 helps for python environments
9797+ # that override globally the `numpy` attribute to point to `numpy_1`.
8798 postPatch = ''
8899 substituteInPlace pyproject.toml \
100100+ --replace-fail "numpy>2.0.0,<2.5" numpy \
89101 --replace-fail "meson-python==0.13.1" "meson-python>=0.13.1" \
9090- --replace-fail "meson==1.2.1" "meson>=1.2.1" \
102102+ --replace-fail "meson==1.2.1" "meson>=1.2.1"
91103 '';
9210493105 nativeBuildInputs = [
+15
pkgs/development/python-modules/scipy/default.nix
···9191 excludes = [ "doc/source/dev/contributor/meson_advanced.rst" ];
9292 })
9393 ];
9494+ # A NOTE regarding the Numpy version relaxing: Both Numpy versions 1.x &
9595+ # 2.x are supported. However upstream wants to always build with Numpy 2,
9696+ # and with it to still be able to run with a Numpy 1 or 2. We insist to
9797+ # perform this substitution even though python3.pkgs.numpy is of version 2
9898+ # nowadays, because our ecosystem unfortunately doesn't allow easily
9999+ # separating runtime and build-system dependencies. See also:
100100+ #
101101+ # https://discourse.nixos.org/t/several-comments-about-priorities-and-new-policies-in-the-python-ecosystem/51790
102102+ #
103103+ # Being able to build (& run) with Numpy 1 helps for python environments
104104+ # that override globally the `numpy` attribute to point to `numpy_1`.
105105+ postPatch = ''
106106+ substituteInPlace pyproject.toml \
107107+ --replace-fail "numpy>2.0.0,<2.5" numpy
108108+ '';
9410995110 build-system =
96111 [