Unverified Commit 863764bb authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #295650 from madsmtm/fix-flutter-macos

Fix Flutter's reference to the `arch` binary on macOS
parents a8bf6367 04ef11c3
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
{ darwin }:
{
  buildInputs ? [ ],
  ...
{}:
{ buildInputs ? [ ]
, ...
}:
{
  postPatch = ''
    if [ "$pname" == "flutter-tools" ]; then
      # Remove impure references to `arch` and use arm64 instead of arm64e.
      # Use arm64 instead of arm64e.
      substituteInPlace lib/src/ios/xcodeproj.dart \
        --replace-fail /usr/bin/arch '${darwin.adv_cmds}/bin/arch' \
        --replace-fail arm64e arm64
    fi
  '';
+1 −3
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@
, flutterSrc
, patches ? [ ]
, pubspecLock
, darwin
}:

buildDartApplication.override { inherit dart; } rec {
@@ -27,10 +26,9 @@ buildDartApplication.override { inherit dart; } rec {
  postPatch = ''
    popd
  ''
  # Remove impure references to `arch` and use arm64 instead of arm64e.
  # Use arm64 instead of arm64e.
  + lib.optionalString stdenv.isDarwin ''
    substituteInPlace lib/src/ios/xcodeproj.dart \
      --replace-fail /usr/bin/arch '${darwin.adv_cmds}/bin/arch' \
      --replace-fail arm64e arm64
  '';