lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

linien-gui: fix build (#400799)

authored by

dotlambda and committed by
GitHub
20be50bf b07044de

+94 -23
+26 -14
pkgs/by-name/li/linien-gui/package.nix
··· 4 4 qt5, 5 5 }: 6 6 7 - python3.pkgs.buildPythonApplication rec { 7 + let 8 + python = python3.override { 9 + self = python; 10 + packageOverrides = self: super: { 11 + numpy = super.numpy_1; 12 + }; 13 + }; 14 + in 15 + python.pkgs.buildPythonApplication rec { 8 16 pname = "linien-gui"; 9 17 pyproject = true; 10 18 11 - inherit (python3.pkgs.linien-common) src version; 19 + inherit (python.pkgs.linien-common) src version; 12 20 13 21 sourceRoot = "${src.name}/linien-gui"; 14 22 15 - nativeBuildInputs = 16 - with python3.pkgs; 17 - [ 18 - setuptools 19 - ] 20 - ++ [ 21 - qt5.wrapQtAppsHook 22 - ]; 23 + build-system = with python.pkgs; [ 24 + setuptools 25 + ]; 26 + nativeBuildInputs = [ 27 + qt5.wrapQtAppsHook 28 + ]; 23 29 24 30 # Makes qt-wayland appear in the qt paths injected by the wrapper - helps users 25 31 # with `QT_QPA_PLATFORM=wayland` in their environment. ··· 27 33 qt5.qtwayland 28 34 ]; 29 35 30 - propagatedBuildInputs = with python3.pkgs; [ 36 + dependencies = with python.pkgs; [ 31 37 appdirs 32 38 click 33 39 pyqtgraph ··· 43 49 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 44 50 ''; 45 51 46 - meta = with lib; { 52 + passthru = { 53 + # Useful for creating .withPackages environments, see NOTE near 54 + # `python3Packages.linien-common.meta.broken`. 55 + inherit python; 56 + }; 57 + 58 + meta = { 47 59 description = "Graphical user interface of the Linien spectroscopy lock application"; 48 60 mainProgram = "linien"; 49 61 homepage = "https://github.com/linien-org/linien/tree/develop/linien-gui"; 50 62 changelog = "https://github.com/linien-org/linien/blob/v${version}/CHANGELOG.md"; 51 - license = licenses.gpl3Plus; 52 - maintainers = with maintainers; [ 63 + license = lib.licenses.gpl3Plus; 64 + maintainers = with lib.maintainers; [ 53 65 fsagbuya 54 66 doronbehar 55 67 ];
+7 -5
pkgs/development/python-modules/linien-client/default.nix
··· 21 21 export HOME=$(mktemp -d) 22 22 ''; 23 23 24 - nativeBuildInputs = [ setuptools ]; 24 + build-system = [ setuptools ]; 25 25 26 - propagatedBuildInputs = [ 26 + dependencies = [ 27 27 fabric 28 28 typing-extensions 29 29 numpy ··· 33 33 34 34 pythonImportsCheck = [ "linien_client" ]; 35 35 36 - meta = with lib; { 36 + meta = { 37 37 description = "Client components of the Linien spectroscopy lock application"; 38 38 homepage = "https://github.com/linien-org/linien/tree/develop/linien-client"; 39 39 changelog = "https://github.com/linien-org/linien/blob/v${version}/CHANGELOG.md"; 40 - license = licenses.gpl3Plus; 41 - maintainers = with maintainers; [ 40 + license = lib.licenses.gpl3Plus; 41 + maintainers = with lib.maintainers; [ 42 42 fsagbuya 43 43 doronbehar 44 44 ]; 45 + # See comment near linien-common.meta.broken 46 + broken = lib.versionAtLeast numpy.version "2"; 45 47 }; 46 48 }
+33 -3
pkgs/development/python-modules/linien-common/default.nix
··· 47 47 pytest = callPackage ./tests.nix { }; 48 48 }; 49 49 50 - meta = with lib; { 50 + meta = { 51 51 description = "Shared components of the Linien spectroscopy lock application"; 52 52 homepage = "https://github.com/linien-org/linien/tree/develop/linien-common"; 53 53 changelog = "https://github.com/linien-org/linien/blob/v${version}/CHANGELOG.md"; 54 - license = licenses.gpl3Plus; 55 - maintainers = with maintainers; [ 54 + license = lib.licenses.gpl3Plus; 55 + maintainers = with lib.maintainers; [ 56 56 fsagbuya 57 57 doronbehar 58 58 ]; 59 + # Numpy 2 is not supported yet, because the server linien, (installed on the 60 + # RedPitaya) must use the same Numpy version as the client (installed with 61 + # Nix). The server linien is bound to use Numpy 1 because Numpy maintainers 62 + # don't distribute pre-built wheels for the armv7l architecture of 63 + # RedPitaya, and it is unfeasible to build it natively there - something 64 + # that `pip install numpy` naively tries to do. Hence, we are bound to use 65 + # on the server the preinstalled Numpy 1 sourced in the .deb package that 66 + # comes with the RedPitaya OS. See also: 67 + # 68 + # - https://github.com/linien-org/linien/commit/ebbb2276b500a18826d11893bb43699b65692c5e 69 + # - https://github.com/linien-org/linien/issues/377 70 + # 71 + # To evaluate this package with python3.withPackages, use: 72 + # 73 + # pythonEnv = pkgs.linien-gui.passthru.python.withPackages(ps: { 74 + # ps.linien-common 75 + # # Other packages... 76 + # }); 77 + # 78 + # NOTE that the above Python environment will use Numpy 1 throughout all 79 + # packages wrapped there (see expression in linien-gui), and this may 80 + # trigger rebuilds for dependencies that depend on Numpy too. Be ready to 81 + # also add more `packageOverrides` to make sure these other dependencies do 82 + # build with numpy_1. 83 + # 84 + # Last NOTE: If you need more packageOverrides besides those provided in 85 + # the `linien-gui` expression, beware of: 86 + # 87 + # - https://github.com/NixOS/nixpkgs/issues/44426 88 + broken = lib.versionAtLeast numpy.version "2"; 59 89 }; 60 90 }
+13 -1
pkgs/development/python-modules/pandas/default.nix
··· 84 84 }) 85 85 ]; 86 86 87 + # A NOTE regarding the Numpy version relaxing: Both Numpy versions 1.x & 88 + # 2.x are supported. However upstream wants to always build with Numpy 2, 89 + # and with it to still be able to run with a Numpy 1 or 2. We insist to 90 + # perform this substitution even though python3.pkgs.numpy is of version 2 91 + # nowadays, because our ecosystem unfortunately doesn't allow easily 92 + # separating runtime and build-system dependencies. See also: 93 + # 94 + # https://discourse.nixos.org/t/several-comments-about-priorities-and-new-policies-in-the-python-ecosystem/51790 95 + # 96 + # Being able to build (& run) with Numpy 1 helps for python environments 97 + # that override globally the `numpy` attribute to point to `numpy_1`. 87 98 postPatch = '' 88 99 substituteInPlace pyproject.toml \ 100 + --replace-fail "numpy>2.0.0,<2.5" numpy \ 89 101 --replace-fail "meson-python==0.13.1" "meson-python>=0.13.1" \ 90 - --replace-fail "meson==1.2.1" "meson>=1.2.1" \ 102 + --replace-fail "meson==1.2.1" "meson>=1.2.1" 91 103 ''; 92 104 93 105 nativeBuildInputs = [
+15
pkgs/development/python-modules/scipy/default.nix
··· 91 91 excludes = [ "doc/source/dev/contributor/meson_advanced.rst" ]; 92 92 }) 93 93 ]; 94 + # A NOTE regarding the Numpy version relaxing: Both Numpy versions 1.x & 95 + # 2.x are supported. However upstream wants to always build with Numpy 2, 96 + # and with it to still be able to run with a Numpy 1 or 2. We insist to 97 + # perform this substitution even though python3.pkgs.numpy is of version 2 98 + # nowadays, because our ecosystem unfortunately doesn't allow easily 99 + # separating runtime and build-system dependencies. See also: 100 + # 101 + # https://discourse.nixos.org/t/several-comments-about-priorities-and-new-policies-in-the-python-ecosystem/51790 102 + # 103 + # Being able to build (& run) with Numpy 1 helps for python environments 104 + # that override globally the `numpy` attribute to point to `numpy_1`. 105 + postPatch = '' 106 + substituteInPlace pyproject.toml \ 107 + --replace-fail "numpy>2.0.0,<2.5" numpy 108 + ''; 94 109 95 110 build-system = 96 111 [