Skip to content

Commit

Permalink
python313Packages.webrtc-noise-gain: fix cross builds (NixOS#375107)
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt authored Jan 19, 2025
2 parents 761c9d7 + 1faa66a commit c368baa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/development/python-modules/webrtc-noise-gain/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ buildPythonPackage rec {
hash = "sha256-GbdG2XM11zgPk2VZ0mu7qMv256jaMyJDHdBCBUnynMY=";
};

postPatch = with stdenv.hostPlatform.uname; ''
# Configure the correct host platform for cross builds
substituteInPlace setup.py --replace-fail \
"system = platform.system().lower()" \
'system = "${lib.toLower system}"'
substituteInPlace setup.py --replace-fail \
"machine = platform.machine().lower()" \
'machine = "${lib.toLower processor}"'
'';

nativeBuildInputs = [
pybind11
setuptools
Expand Down

0 comments on commit c368baa

Please sign in to comment.