Fix macOS build on Nix-provided Flutter
This commit is contained in:
parent
606bf78152
commit
f3ea9d67a6
2 changed files with 17 additions and 2 deletions
|
|
@ -349,7 +349,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
|
shellScript = "export PATH=\"$PROJECT_DIR/scripts:$PATH\"\necho \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
|
||||||
};
|
};
|
||||||
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|
@ -369,7 +369,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
shellScript = "export PATH=\"$PROJECT_DIR/scripts:$PATH\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||||
};
|
};
|
||||||
446C82D5FE82BD05F78EDA6A /* [CP] Check Pods Manifest.lock */ = {
|
446C82D5FE82BD05F78EDA6A /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|
|
||||||
15
macos/scripts/lipo
Executable file
15
macos/scripts/lipo
Executable file
|
|
@ -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 "$@"
|
||||||
Loading…
Reference in a new issue