forked from Nexus/nexus
Add diagnostics for the still-failing Nix lipo permission issue
This commit is contained in:
parent
970d124ad6
commit
f155d2dd2d
4 changed files with 28 additions and 8 deletions
14
.github/workflows/ios.yml
vendored
14
.github/workflows/ios.yml
vendored
|
|
@ -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
|
||||
'
|
||||
|
||||
|
|
|
|||
14
.github/workflows/macos.yml
vendored
14
.github/workflows/macos.yml
vendored
|
|
@ -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
|
||||
'
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue