Skip to content

Commit

Permalink
python313Packages.webrtc-noise-gain: fix cross builds
Browse files Browse the repository at this point in the history
Closes: #375092
(cherry picked from commit 1faa66a)
  • Loading branch information
mweinelt authored and github-actions[bot] committed Jan 19, 2025
1 parent 107d5ef commit aeb4870
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 aeb4870

Please sign in to comment.