diff --git a/scripts/lipo b/ios/scripts/lipo similarity index 100% rename from scripts/lipo rename to ios/scripts/lipo diff --git a/macos/scripts/lipo b/macos/scripts/lipo new file mode 100755 index 0000000..9e32655 --- /dev/null +++ b/macos/scripts/lipo @@ -0,0 +1,15 @@ +#!/bin/sh +# Workaround for NixOS/nixpkgs#405066: frameworks copied from the Nix store +# 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. +for arg in "$@"; do + case "$arg" in + */*.framework/*) + fw_dir="${arg%.framework/*}.framework" + chmod -R +w "$fw_dir" 2>/dev/null + ;; + esac +done + +exec /usr/bin/lipo "$@"