diff options
author | Mads Marquart <mads@marquart.dk> | 2024-03-18 16:59:10 +0100 |
---|---|---|
committer | Mads Marquart <mads@marquart.dk> | 2024-03-18 17:19:10 +0100 |
commit | 04ef11c35a395e0db1f906d67bb727289f00d785 (patch) | |
tree | cdb9449a833539e87f70d16f6d70878c08dbc534 /pkgs/development | |
parent | 3da824d0b1fcc874bfb26412139949fb47cc10f4 (diff) |
flutter: Allow impure reference to the `arch` binary on macOS
The `arch` binary is not available in `darwin.adv_cmds`, it is provided via. `darwin.system_cmds` instead, but support for this is still experimental.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/flutter/artifacts/overrides/darwin.nix | 10 | ||||
-rw-r--r-- | pkgs/development/compilers/flutter/flutter-tools.nix | 4 |
2 files changed, 5 insertions, 9 deletions
diff --git a/pkgs/development/compilers/flutter/artifacts/overrides/darwin.nix b/pkgs/development/compilers/flutter/artifacts/overrides/darwin.nix index b03b14f68c8b6..83257d4e34d51 100644 --- a/pkgs/development/compilers/flutter/artifacts/overrides/darwin.nix +++ b/pkgs/development/compilers/flutter/artifacts/overrides/darwin.nix @@ -1,14 +1,12 @@ -{ darwin }: -{ - buildInputs ? [ ], - ... +{}: +{ buildInputs ? [ ] +, ... }: { postPatch = '' if [ "$pname" == "flutter-tools" ]; then - # Remove impure references to `arch` and use arm64 instead of arm64e. + # Use arm64 instead of arm64e. substituteInPlace lib/src/ios/xcodeproj.dart \ - --replace-fail /usr/bin/arch '${darwin.adv_cmds}/bin/arch' \ --replace-fail arm64e arm64 fi ''; diff --git a/pkgs/development/compilers/flutter/flutter-tools.nix b/pkgs/development/compilers/flutter/flutter-tools.nix index f4bf84ad366ff..cf35ed8cbc455 100644 --- a/pkgs/development/compilers/flutter/flutter-tools.nix +++ b/pkgs/development/compilers/flutter/flutter-tools.nix @@ -9,7 +9,6 @@ , flutterSrc , patches ? [ ] , pubspecLock -, darwin }: buildDartApplication.override { inherit dart; } rec { @@ -27,10 +26,9 @@ buildDartApplication.override { inherit dart; } rec { postPatch = '' popd '' - # Remove impure references to `arch` and use arm64 instead of arm64e. + # Use arm64 instead of arm64e. + lib.optionalString stdenv.isDarwin '' substituteInPlace lib/src/ios/xcodeproj.dart \ - --replace-fail /usr/bin/arch '${darwin.adv_cmds}/bin/arch' \ --replace-fail arm64e arm64 ''; |