Merge pull request #286750 from helsinki-systems/feat/flutter-aarch64-darwin

flutter313/flutter316: Fix aarch64-darwin
This commit is contained in:
0x4A6F 2024-02-14 11:20:27 +01:00 committed by GitHub
commit 57ce23c730
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 55 additions and 12 deletions

View file

@ -0,0 +1,15 @@
{ darwin }:
{
buildInputs ? [ ],
...
}:
{
postPatch = ''
if [ "$pname" == "flutter-tools" ]; then
# Remove impure references to `arch` and 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
'';
}

View file

@ -1,4 +1,6 @@
{ systemPlatform
{ lib
, stdenv
, systemPlatform
, buildDartApplication
, git
, which
@ -7,6 +9,7 @@
, flutterSrc
, patches ? [ ]
, pubspecLock
, darwin
}:
buildDartApplication.override { inherit dart; } rec {
@ -21,7 +24,15 @@ buildDartApplication.override { inherit dart; } rec {
inherit patches;
# The given patches are made for the entire SDK source tree.
prePatch = ''pushd "$NIX_BUILD_TOP/source"'';
postPatch = ''popd'';
postPatch = ''
popd
''
# Remove impure references to `arch` and 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
'';
# When the JIT snapshot is being built, the application needs to run.
# It attempts to generate configuration files, and relies on a few external

View file

@ -136,7 +136,7 @@ let
'';
homepage = "https://flutter.dev";
license = licenses.bsd3;
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
maintainers = with maintainers; [ babariviere ericdallo FlafyDev hacker1024 ];
};
};

View file

@ -13,7 +13,7 @@ index 1ce1951cef..1bd7602318 100644
+ 'x86_64-linux' => HostPlatform.linux_x64,
+ 'aarch64-linux' => HostPlatform.linux_arm64,
+ 'x86_64-darwin' => HostPlatform.darwin_x64,
+ 'arm64-darwin' => HostPlatform.darwin_arm64,
+ 'aarch64-darwin' => HostPlatform.darwin_arm64,
+ String value => throw ArgumentError.value(value, 'NIX_FLUTTER_HOST_PLATFORM', 'Unknown Nix host platform!'),
+ };

View file

@ -22,6 +22,7 @@ let
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
derivations =

View file

@ -13,42 +13,50 @@
"android": {
"x86_64-linux": "sha256-Uc36aBq8wQo2aEvjAPOoixZElWOE/GNRm2GUfhbwT3Y=",
"aarch64-linux": "sha256-Uc36aBq8wQo2aEvjAPOoixZElWOE/GNRm2GUfhbwT3Y=",
"x86_64-darwin": "sha256-v/6/GTj7732fEOIgSaoM00yaw2qNwOMuvbuoCvii7vQ="
"x86_64-darwin": "sha256-v/6/GTj7732fEOIgSaoM00yaw2qNwOMuvbuoCvii7vQ=",
"aarch64-darwin": "sha256-v/6/GTj7732fEOIgSaoM00yaw2qNwOMuvbuoCvii7vQ="
},
"fuchsia": {
"x86_64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"aarch64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"x86_64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk="
"x86_64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"aarch64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk="
},
"ios": {
"x86_64-linux": "sha256-QwkeGnutTVsm682CqxRtEd9rKUvN7zlAJcqkvAQYwao=",
"aarch64-linux": "sha256-QwkeGnutTVsm682CqxRtEd9rKUvN7zlAJcqkvAQYwao=",
"x86_64-darwin": "sha256-QwkeGnutTVsm682CqxRtEd9rKUvN7zlAJcqkvAQYwao="
"x86_64-darwin": "sha256-QwkeGnutTVsm682CqxRtEd9rKUvN7zlAJcqkvAQYwao=",
"aarch64-darwin": "sha256-QwkeGnutTVsm682CqxRtEd9rKUvN7zlAJcqkvAQYwao="
},
"linux": {
"x86_64-linux": "sha256-0gIOwux3YBdmcXgwICr8dpftj1CauaBUX8Rt5GG0WSs=",
"aarch64-linux": "sha256-drGHsuJoOCLqrhVrXczqJRCOtpeWVlqdWW0OSMS/l5M=",
"x86_64-darwin": "sha256-0gIOwux3YBdmcXgwICr8dpftj1CauaBUX8Rt5GG0WSs="
"x86_64-darwin": "sha256-0gIOwux3YBdmcXgwICr8dpftj1CauaBUX8Rt5GG0WSs=",
"aarch64-darwin": "sha256-drGHsuJoOCLqrhVrXczqJRCOtpeWVlqdWW0OSMS/l5M="
},
"macos": {
"x86_64-linux": "sha256-9WqCJQ37mcGc5tzfqQoY5CqHWHGTizjXf9p73bdnNWc=",
"aarch64-linux": "sha256-9WqCJQ37mcGc5tzfqQoY5CqHWHGTizjXf9p73bdnNWc=",
"x86_64-darwin": "sha256-9WqCJQ37mcGc5tzfqQoY5CqHWHGTizjXf9p73bdnNWc="
"x86_64-darwin": "sha256-9WqCJQ37mcGc5tzfqQoY5CqHWHGTizjXf9p73bdnNWc=",
"aarch64-darwin": "sha256-9WqCJQ37mcGc5tzfqQoY5CqHWHGTizjXf9p73bdnNWc="
},
"universal": {
"x86_64-linux": "sha256-wATt1UPjo/fh7RFO1vvcUAdo0dMAaaOUIuzYodsM0v0=",
"aarch64-linux": "sha256-Z9bszNaIpCccG7OfvE5WFsw36dITiyCQAZ6p29+Yq68=",
"x86_64-darwin": "sha256-qN5bAXRfQ78TWF3FLBIxWzUB5y5OrZVQTEilY5J/+2k="
"x86_64-darwin": "sha256-qN5bAXRfQ78TWF3FLBIxWzUB5y5OrZVQTEilY5J/+2k=",
"aarch64-darwin": "sha256-mSpAPKyP9v0dbkXqYkzGOnD5OEjRZigiRElXXcHZ5TE="
},
"web": {
"x86_64-linux": "sha256-DVXJOOFxv7tKt3d0NaYMexkphEcr7+gDFV67I6iAYa0=",
"aarch64-linux": "sha256-DVXJOOFxv7tKt3d0NaYMexkphEcr7+gDFV67I6iAYa0=",
"x86_64-darwin": "sha256-DVXJOOFxv7tKt3d0NaYMexkphEcr7+gDFV67I6iAYa0="
"x86_64-darwin": "sha256-DVXJOOFxv7tKt3d0NaYMexkphEcr7+gDFV67I6iAYa0=",
"aarch64-darwin": "sha256-DVXJOOFxv7tKt3d0NaYMexkphEcr7+gDFV67I6iAYa0="
},
"windows": {
"x86_64-linux": "sha256-s8fJtwQkuZaGXr6vrPiKfpwP/NfewbETwyp9ERGqHYI=",
"aarch64-linux": "sha256-s8fJtwQkuZaGXr6vrPiKfpwP/NfewbETwyp9ERGqHYI=",
"x86_64-darwin": "sha256-s8fJtwQkuZaGXr6vrPiKfpwP/NfewbETwyp9ERGqHYI="
"x86_64-darwin": "sha256-s8fJtwQkuZaGXr6vrPiKfpwP/NfewbETwyp9ERGqHYI=",
"aarch64-darwin": "sha256-s8fJtwQkuZaGXr6vrPiKfpwP/NfewbETwyp9ERGqHYI="
}
},
"pubspecLock": {

View file

@ -13,41 +13,49 @@
"android": {
"aarch64-linux": "sha256-j8jstEE1RsTVHJbq6f6We0An+CyJz9JH/YClyNA4mwg=",
"x86_64-darwin": "sha256-0FBI0CGMcxyttkzrdyjJlkGAjFd/yMuAQS3pDrNXZZw=",
"aarch64-darwin": "sha256-0FBI0CGMcxyttkzrdyjJlkGAjFd/yMuAQS3pDrNXZZw=",
"x86_64-linux": "sha256-j8jstEE1RsTVHJbq6f6We0An+CyJz9JH/YClyNA4mwg="
},
"fuchsia": {
"aarch64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"x86_64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"aarch64-darwin": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk=",
"x86_64-linux": "sha256-eu0BERdz53CkSexbpu3KA7O6Q4g0s9SGD3t1Snsk3Fk="
},
"ios": {
"aarch64-linux": "sha256-V3VXRX8hn45J+NhzKli+NAc3TGiSoeVQRlJte8DDbZw=",
"x86_64-darwin": "sha256-V3VXRX8hn45J+NhzKli+NAc3TGiSoeVQRlJte8DDbZw=",
"aarch64-darwin": "sha256-V3VXRX8hn45J+NhzKli+NAc3TGiSoeVQRlJte8DDbZw=",
"x86_64-linux": "sha256-V3VXRX8hn45J+NhzKli+NAc3TGiSoeVQRlJte8DDbZw="
},
"linux": {
"aarch64-linux": "sha256-LWpou3L7bAWGn8i4nDT/BZez2Uhf/LbqC2C4Z98hCHQ=",
"x86_64-darwin": "sha256-BzjmO4F8B9GagYPbdvoT55r+YgZcP4BUaKgJPGZDXOU=",
"aarch64-darwin": "sha256-LWpou3L7bAWGn8i4nDT/BZez2Uhf/LbqC2C4Z98hCHQ=",
"x86_64-linux": "sha256-BzjmO4F8B9GagYPbdvoT55r+YgZcP4BUaKgJPGZDXOU="
},
"macos": {
"aarch64-linux": "sha256-BMFqhhy1O1hK33Pj2cxnCAzK9wwHkwT4gNbJ1GaLrnk=",
"x86_64-darwin": "sha256-BMFqhhy1O1hK33Pj2cxnCAzK9wwHkwT4gNbJ1GaLrnk=",
"aarch64-darwin": "sha256-BMFqhhy1O1hK33Pj2cxnCAzK9wwHkwT4gNbJ1GaLrnk=",
"x86_64-linux": "sha256-BMFqhhy1O1hK33Pj2cxnCAzK9wwHkwT4gNbJ1GaLrnk="
},
"universal": {
"aarch64-linux": "sha256-uB2YZRjioP/koMbPvaBHsezjPO0w5a+BpxZaDuiINIY=",
"x86_64-darwin": "sha256-Qwf12gMqrW5nDC9Is08oxWTbKMptRQRAIb58JETq3xA=",
"aarch64-darwin": "sha256-Emus5J3mqPv47PD6xqNUD1KpXhVkX4JpURWuYG6KC14=",
"x86_64-linux": "sha256-quSFKx7TZRJpK+4YDt5f9jwr7rZsSsaXMxhJ8vIcczQ="
},
"web": {
"aarch64-linux": "sha256-rQphVm+T4k5B4OYYw0sJwYBOsNvUOC9fu8IuvXN7hVw=",
"x86_64-darwin": "sha256-rQphVm+T4k5B4OYYw0sJwYBOsNvUOC9fu8IuvXN7hVw=",
"aarch64-darwin": "sha256-rQphVm+T4k5B4OYYw0sJwYBOsNvUOC9fu8IuvXN7hVw=",
"x86_64-linux": "sha256-rQphVm+T4k5B4OYYw0sJwYBOsNvUOC9fu8IuvXN7hVw="
},
"windows": {
"aarch64-linux": "sha256-HL3QLwzze9aO+T/2/xbHqhKV1/ba++MuRnk206hfJdU=",
"x86_64-darwin": "sha256-HL3QLwzze9aO+T/2/xbHqhKV1/ba++MuRnk206hfJdU=",
"aarch64-darwin": "sha256-HL3QLwzze9aO+T/2/xbHqhKV1/ba++MuRnk206hfJdU=",
"x86_64-linux": "sha256-HL3QLwzze9aO+T/2/xbHqhKV1/ba++MuRnk206hfJdU="
}
},