mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-07 21:18:05 +03: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 = ''
|
postPatch = ''
|
||||||
if [ "$pname" == "flutter-tools" ]; then
|
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 \
|
substituteInPlace lib/src/ios/xcodeproj.dart \
|
||||||
--replace-fail /usr/bin/arch '${darwin.adv_cmds}/bin/arch' \
|
|
||||||
--replace-fail arm64e arm64
|
--replace-fail arm64e arm64
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
, flutterSrc
|
, flutterSrc
|
||||||
, patches ? [ ]
|
, patches ? [ ]
|
||||||
, pubspecLock
|
, pubspecLock
|
||||||
, darwin
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildDartApplication.override { inherit dart; } rec {
|
buildDartApplication.override { inherit dart; } rec {
|
||||||
@ -27,10 +26,9 @@ buildDartApplication.override { inherit dart; } rec {
|
|||||||
postPatch = ''
|
postPatch = ''
|
||||||
popd
|
popd
|
||||||
''
|
''
|
||||||
# Remove impure references to `arch` and use arm64 instead of arm64e.
|
# Use arm64 instead of arm64e.
|
||||||
+ lib.optionalString stdenv.isDarwin ''
|
+ lib.optionalString stdenv.isDarwin ''
|
||||||
substituteInPlace lib/src/ios/xcodeproj.dart \
|
substituteInPlace lib/src/ios/xcodeproj.dart \
|
||||||
--replace-fail /usr/bin/arch '${darwin.adv_cmds}/bin/arch' \
|
|
||||||
--replace-fail arm64e arm64
|
--replace-fail arm64e arm64
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user