Add diagnostics for the still-failing Nix lipo permission issue

This commit is contained in:
Erwan Leboucher 2026-08-09 00:14:38 +02:00
commit f155d2dd2d
Signed by: eleboucher
SSH key fingerprint: SHA256:fjyYE6Mo6r2wpEtyYKFfGpX8fmR9bjL0NxWBHosnOgk
4 changed files with 28 additions and 8 deletions

View file

@ -28,9 +28,17 @@ jobs:
flutter pub get
dart scripts/generate.dart
flutter pub run build_runner build
# Nix-provided Flutter'"'"'s bundled frameworks are read-only, which
# breaks lipo when Flutter thins them into build/ (NixOS/nixpkgs#405066).
find "$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")" -type d -iname "*.framework" -exec chmod -R u+w {} + 2>/dev/null || true
# Diagnostics for NixOS/nixpkgs#405066 (Flutter'"'"'s bundled
# frameworks are read-only, which breaks lipo when Flutter thins
# them into build/). Remove once this is confirmed fixed.
echo "lipo resolves to: $(command -v lipo)"
FLUTTER_ROOT="$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")"
echo "Resolved Flutter root: $FLUTTER_ROOT"
find "$FLUTTER_ROOT" -type d -iname "*.framework" -print
find "$FLUTTER_ROOT" -type d -iname "*.framework" -exec chmod -R u+w {} + 2>&1 || true
find "$FLUTTER_ROOT" -type d -iname "*.framework" -exec ls -ld {} \;
flutter build ios --release --no-codesign
'

View file

@ -28,9 +28,17 @@ jobs:
flutter pub get
dart scripts/generate.dart
flutter pub run build_runner build
# Nix-provided Flutter'"'"'s bundled frameworks are read-only, which
# breaks lipo when Flutter thins them into build/ (NixOS/nixpkgs#405066).
find "$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")" -type d -iname "*.framework" -exec chmod -R u+w {} + 2>/dev/null || true
# Diagnostics for NixOS/nixpkgs#405066 (Flutter'"'"'s bundled
# frameworks are read-only, which breaks lipo when Flutter thins
# them into build/). Remove once this is confirmed fixed.
echo "lipo resolves to: $(command -v lipo)"
FLUTTER_ROOT="$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")"
echo "Resolved Flutter root: $FLUTTER_ROOT"
find "$FLUTTER_ROOT" -type d -iname "*.framework" -print
find "$FLUTTER_ROOT" -type d -iname "*.framework" -exec chmod -R u+w {} + 2>&1 || true
find "$FLUTTER_ROOT" -type d -iname "*.framework" -exec ls -ld {} \;
flutter build macos --release
'

View file

@ -3,11 +3,13 @@
# stay read-only, so lipo can't write its temporary output file when Flutter
# thins them during the build. Make the framework writable before delegating
# to the real lipo.
echo "lipo shim invoked with: $*" >&2
for arg in "$@"; do
case "$arg" in
*/*.framework/*)
fw_dir="${arg%.framework/*}.framework"
chmod -R +w "$fw_dir" 2>/dev/null
echo "lipo shim: chmod -R +w $fw_dir" >&2
chmod -R +w "$fw_dir"
;;
esac
done

View file

@ -3,11 +3,13 @@
# stay read-only, so lipo can't write its temporary output file when Flutter
# thins FlutterMacOS.framework during the build. Make the framework writable
# before delegating to the real lipo.
echo "lipo shim invoked with: $*" >&2
for arg in "$@"; do
case "$arg" in
*/*.framework/*)
fw_dir="${arg%.framework/*}.framework"
chmod -R +w "$fw_dir" 2>/dev/null
echo "lipo shim: chmod -R +w $fw_dir" >&2
chmod -R +w "$fw_dir"
;;
esac
done