From a5f42fe56e2ba0062690332d079296b57d3efcf4 Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Sat, 8 Aug 2026 17:56:01 -0400 Subject: [PATCH] add workaround for lipo issues with Flutter from Nix on MacOS --- .github/workflows/ios.yml | 12 +++++++++++- .github/workflows/macos.yml | 13 +++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 015cd13..734deb6 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -22,7 +22,17 @@ jobs: extra_nix_config: experimental-features = nix-command flakes flake-self-attrs - name: Build app - run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build && flutter build ios --release --no-codesign" + run: | + nix develop --command bash -c ' + set -e + 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 + flutter build ios --release --no-codesign + ' # Unsigned IPA: SideStore/AltStore re-sign this on-device with the # user's own Apple ID at install time, so no certificate is needed here. diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e7040fa..ccbd70e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -21,8 +21,17 @@ jobs: with: extra_nix_config: experimental-features = nix-command flakes flake-self-attrs - - name: Build app - run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build && flutter build macos --release" + - run: | + nix develop --command bash -c ' + set -e + 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 + flutter build macos --release + ' - name: Upload installer artifact uses: actions/upload-artifact@v6