mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 04:45:39 +00:00
Merge pull request #295650 from madsmtm/fix-flutter-macos
Fix Flutter's reference to the `arch` binary on macOS
This commit is contained in:
commit
863764bb98
@ -1,14 +1,12 @@
|
||||
{ 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
|
||||
'';
|
||||
|
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user