···11+diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart
22+index e4e474ab6e..5548599802 100644
33+--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart
44++++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
55+@@ -1693,7 +1693,7 @@ Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and
66+77+ // Populate the cache. We call this before pub get below so that the
88+ // sky_engine package is available in the flutter cache for pub to find.
99+- if (shouldUpdateCache) {
1010++ if (false) {
1111+ // First always update universal artifacts, as some of these (e.g.
1212+ // ios-deploy on macOS) are required to determine `requiredArtifacts`.
1313+ final bool offline;
1414+diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
1515+index a1104da..1749d65 100644
1616+--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
1717++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
1818+@@ -444,12 +444,8 @@ class FlutterCommandRunner extends CommandRunner<void> {
1919+ globals.analytics.suppressTelemetry();
2020+ }
2121+2222+- globals.flutterVersion.ensureVersionFile();
2323+ final bool machineFlag =
2424+ topLevelResults[FlutterGlobalOptions.kMachineFlag] as bool? ?? false;
2525+- if (await _shouldCheckForUpdates(topLevelResults, topLevelMachineFlag: machineFlag)) {
2626+- await globals.flutterVersion.checkFlutterVersionFreshness();
2727+- }
2828+2929+ // See if the user specified a specific device.
3030+ final String? specifiedDeviceId =
···11+From 6df275df3b8694daf16302b407520e3b1dee6724 Mon Sep 17 00:00:00 2001
22+From: Philip Hayes <philiphayes9@gmail.com>
33+Date: Thu, 12 Sep 2024 13:23:00 -0700
44+Subject: [PATCH] fix: cleanup xcode_backend.sh to fix iOS build w/
55+ `NixOS/nixpkgs` flutter
66+77+This patch cleans up `xcode_backend.sh`. It now effectively just runs
88+`exec $FLUTTER_ROOT/bin/dart ./xcode_backend.dart`.
99+1010+The previous `xcode_backend.sh` tries to discover `$FLUTTER_ROOT` from
1111+argv[0], even though its presence is already guaranteed (the wrapped
1212+`xcode_backend.dart` also relies on this env).
1313+1414+When using nixpkgs flutter, the flutter SDK directory is composed of several
1515+layers, joined together using symlinks (called a `symlinkJoin`). Without this
1616+patch, the auto-discover traverses the symlinks into the wrong layer, and so it
1717+uses an "unwrapped" `dart` command instead of a "wrapped" dart that sets some
1818+important envs/flags (like `$FLUTTER_ROOT`).
1919+2020+Using the "unwrapped" dart then manifests in this error when compiling, since
2121+it doesn't see the ios build-support artifacts:
2222+2323+```
2424+$ flutter run -d iphone
2525+Running Xcode build...
2626+Xcode build done. 6.4s
2727+Failed to build iOS app
2828+Error (Xcode): Target debug_unpack_ios failed: Error: Flutter failed to create a directory at "/<nix-store>/XXXX-flutter-3.24.1-unwrapped/bin/cache/artifacts".
2929+```
3030+---
3131+ packages/flutter_tools/bin/xcode_backend.sh | 25 ++++-----------------
3232+ 1 file changed, 4 insertions(+), 21 deletions(-)
3333+3434+diff --git a/packages/flutter_tools/bin/xcode_backend.sh b/packages/flutter_tools/bin/xcode_backend.sh
3535+index 2889d7c8e4..48b9d06c6e 100755
3636+--- a/packages/flutter_tools/bin/xcode_backend.sh
3737++++ b/packages/flutter_tools/bin/xcode_backend.sh
3838+@@ -13,24 +13,7 @@
3939+ # exit on error, or usage of unset var
4040+ set -euo pipefail
4141+4242+-# Needed because if it is set, cd may print the path it changed to.
4343+-unset CDPATH
4444+-
4545+-function follow_links() (
4646+- cd -P "$(dirname -- "$1")"
4747+- file="$PWD/$(basename -- "$1")"
4848+- while [[ -h "$file" ]]; do
4949+- cd -P "$(dirname -- "$file")"
5050+- file="$(readlink -- "$file")"
5151+- cd -P "$(dirname -- "$file")"
5252+- file="$PWD/$(basename -- "$file")"
5353+- done
5454+- echo "$file"
5555+-)
5656+-
5757+-PROG_NAME="$(follow_links "${BASH_SOURCE[0]}")"
5858+-BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
5959+-FLUTTER_ROOT="$BIN_DIR/../../.."
6060+-DART="$FLUTTER_ROOT/bin/dart"
6161+-
6262+-"$DART" "$BIN_DIR/xcode_backend.dart" "$@" "ios"
6363++# Run `dart ./xcode_backend.dart` with the dart from $FLUTTER_ROOT.
6464++dart="${FLUTTER_ROOT}/bin/dart"
6565++xcode_backend_dart="${BASH_SOURCE[0]%.sh}.dart"
6666++exec "${dart}" "${xcode_backend_dart}" "$@" "ios"
6767+--
6868+2.46.0
+15-18
pkgs/development/compilers/zulu/24.nix
···55}@args:
6677let
88- # For 24 JDK FX is newer than regular JDK
99- zuluVersion = if enableJavaFX then "24.30.13" else "24.30.11";
88+ # For 24 JDK FX can be different version than regular JDK
99+ zuluVersion = if enableJavaFX then "24.32.13" else "24.32.13";
1010+ jdkVersion = "24.0.2";
1011in
1112callPackage ./common.nix (
1213 {
···1415 # Note that the latest build may differ by platform
1516 dists = {
1617 x86_64-linux = {
1717- inherit zuluVersion;
1818- jdkVersion = "24.0.1";
1818+ inherit zuluVersion jdkVersion;
1919 hash =
2020 if enableJavaFX then
2121- "sha256-jbpWNE+X5GJABQERq126ediyzGRQE9NZy9oMW/sPUa0="
2121+ "sha256-6ZCa348yFLoZ70iDjNkN17dl1IWe53HxKMGpMhFuEOE="
2222 else
2323- "sha256-EvaVfDoqdNNtaSz+467rlJ8VtdgNrQi/DT7ZMNZthlk=";
2323+ "sha256-seZl5oZmHJlAFsOR6mFAvX9CEY+WatKIeYbi7W8RO/U=";
2424 };
25252626 aarch64-linux = {
2727- inherit zuluVersion;
2828- jdkVersion = "24.0.1";
2727+ inherit zuluVersion jdkVersion;
2928 hash =
3029 if enableJavaFX then
3131- "sha256-N9VOweloyX/2bFPH3L+Iw7nTkbiE7LvDNnTNM1b8Ghc="
3030+ "sha256-pVspe5R5INmEIJNiihDanOwleBklUp7Svj1NwzOe+ws="
3231 else
3333- "sha256-4R5K5XTgpR9kq9WWE3SgvqVTq8CFvyb943zAiSsq3k0=";
3232+ "sha256-hV19g22QKWngOvNGh4dCaTOzLke6VjdsPCGQiVlyij0=";
3433 };
35343635 x86_64-darwin = {
3737- inherit zuluVersion;
3838- jdkVersion = "24.0.1";
3636+ inherit zuluVersion jdkVersion;
3937 hash =
4038 if enableJavaFX then
4141- "sha256-c6Gwj8ol2YLfo4sMeCMGfYQvtDz7029L0Yj1dqVQvsw="
3939+ "sha256-JXsx8GvjPEQO9ZN3p+CraSWeqc0KDIRBado+jz7l2ww="
4240 else
4343- "sha256-VhGOiZaspXeVVLEp0MJZXxj/+ovGgmy+gRb2BZ9OuhY=";
4141+ "sha256-UHY+Oy6g98bVk5BTfd/Mx3OT5He9SnWUR0L+LZso3Lo=";
4442 };
45434644 aarch64-darwin = {
4747- inherit zuluVersion;
4848- jdkVersion = "24.0.1";
4545+ inherit zuluVersion jdkVersion;
4946 hash =
5047 if enableJavaFX then
5151- "sha256-Sac+DxNyGqsiStpc/wZYd2K7rvPEjo901kOYERYi+Sw="
4848+ "sha256-Z825S6qxHMm3kwHQnu15dihguDOrxlM1lca3wU8lCqk="
5249 else
5353- "sha256-pJsq2gKcTy44zbFbSAj6Kd5VZi095jKGkZqd8ceIz7E=";
5050+ "sha256-jDHoPG4NpNXVK35yNHe5JBkmaKNAixmmMEE0P9jcfnU=";
5451 };
5552 };
5653 }