From f155d2dd2dab52098e69b5e9ed4e30b93e131279 Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Sun, 9 Aug 2026 00:14:38 +0200 Subject: [PATCH] Add diagnostics for the still-failing Nix lipo permission issue --- .github/workflows/ios.yml | 14 +++++++++++--- .github/workflows/macos.yml | 14 +++++++++++--- ios/scripts/lipo | 4 +++- macos/scripts/lipo | 4 +++- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index a3428ef..7ff31c8 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -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 ' diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 65e2060..dcdaf1d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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 ' diff --git a/ios/scripts/lipo b/ios/scripts/lipo index eea1eea..95fcd2c 100755 --- a/ios/scripts/lipo +++ b/ios/scripts/lipo @@ -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 diff --git a/macos/scripts/lipo b/macos/scripts/lipo index 9e32655..1bd16d7 100755 --- a/macos/scripts/lipo +++ b/macos/scripts/lipo @@ -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