diff --git a/pkgs/development/python-modules/bcrypt/default.nix b/pkgs/development/python-modules/bcrypt/default.nix index 89ff93e943094..93e4a7addef2a 100644 --- a/pkgs/development/python-modules/bcrypt/default.nix +++ b/pkgs/development/python-modules/bcrypt/default.nix @@ -5,7 +5,7 @@ rustPlatform, rustc, setuptools, - setuptools-rust, + setuptoolsRustBuildHook, fetchPypi, pythonOlder, pytestCheckHook, @@ -41,7 +41,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools - setuptools-rust + setuptoolsRustBuildHook rustPlatform.cargoSetupHook cargo rustc diff --git a/pkgs/development/python-modules/contourpy/default.nix b/pkgs/development/python-modules/contourpy/default.nix index e164297e21e79..0d27dee819230 100644 --- a/pkgs/development/python-modules/contourpy/default.nix +++ b/pkgs/development/python-modules/contourpy/default.nix @@ -1,14 +1,17 @@ { lib, + buildPackages, buildPythonPackage, fetchFromGitHub, python, pythonOlder, + python3, # build meson, meson-python, ninja, + nukeReferences, pybind11, # propagates @@ -22,7 +25,9 @@ # tests matplotlib, pillow, + pytest-xdist, pytestCheckHook, + wurlitzer, }: let @@ -49,6 +54,7 @@ let nativeBuildInputs = [ meson ninja + nukeReferences pybind11 ]; @@ -70,6 +76,8 @@ let matplotlib pillow pytestCheckHook + pytest-xdist + wurlitzer ]; passthru.tests = { @@ -80,6 +88,12 @@ let pythonImportsCheck = [ "contourpy" ]; + # remove references to buildPackages.python3, which is not allowed for cross builds. + preFixup = '' + nuke-refs -e "${buildPackages.python3}" \ + $out/${python3.sitePackages}/contourpy/util/{_build_config.py,__pycache__/_build_config.*} + ''; + meta = with lib; { changelog = "https://github.com/contourpy/contourpy/releases/tag/v${version}"; description = "Python library for calculating contours in 2D quadrilateral grids"; diff --git a/pkgs/development/python-modules/home-assistant-chip-wheels/default.nix b/pkgs/development/python-modules/home-assistant-chip-wheels/default.nix index 4699055253244..c3172aa90a190 100644 --- a/pkgs/development/python-modules/home-assistant-chip-wheels/default.nix +++ b/pkgs/development/python-modules/home-assistant-chip-wheels/default.nix @@ -32,6 +32,7 @@ parameterized, pip-tools, pkg-config, + pkgconfig, prompt-toolkit, protobuf, psutil, @@ -105,6 +106,7 @@ stdenv.mkDerivation rec { zap-chip # gdbus-codegen glib + pkgconfig python3 # dependencies of build scripts click @@ -193,6 +195,7 @@ stdenv.mkDerivation rec { packaging parameterized pip-tools + pkgconfig prompt-toolkit protobuf psutil @@ -223,26 +226,18 @@ stdenv.mkDerivation rec { wheel yapf ]; - depListToAttrs = - list: - builtins.listToAttrs ( - map (dep: { - name = dep.name; - value = dep; - }) (lib.filter (x: x != null) list) - ); - saturateDependencies = - deps: - let - before = deps; - new = lib.mergeAttrsList ( - map (dep: depListToAttrs (dep.propagatedBuildInputs or [ ])) (lib.attrValues before) - ); - after = before // new; - in - if lib.attrNames before != lib.attrNames after then saturateDependencies after else before; - saturateDependencyList = list: lib.attrValues (saturateDependencies (depListToAttrs list)); - saturatedDependencyList = lib.filter (drv: drv ? dist) (saturateDependencyList dependencies); + filterNull = list: lib.filter (dep: dep != null) list; + toItem = dep: { + inherit dep; + key = dep.name; + }; + saturatedDependencies = lib.genericClosure { + startSet = map toItem (filterNull dependencies); + operator = item: map toItem (filterNull ((item.dep).propagatedBuildInputs or [ ])); + }; + saturatedDependencyList = lib.filter (dep: dep ? dist && dep != null) ( + map (item: item.dep) saturatedDependencies + ); in lib.concatMapStringsSep " " (dep: "file://${dep.dist}") saturatedDependencyList;