Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3506252
D5479.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
962 B
Referenced Files
None
Subscribers
None
D5479.diff
View Options
diff --git a/scripts/build-rust-native-library.sh b/scripts/build-rust-native-library.sh
--- a/scripts/build-rust-native-library.sh
+++ b/scripts/build-rust-native-library.sh
@@ -1,11 +1,20 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
+set -euxo pipefail
+
+COMM_NIX_PATH="$HOME/.cache/comm/path"
+
+# If in nix environment, re-expose nix PATH
+if [[ -f "$COMM_NIX_PATH" ]]; then
+ # shellcheck source=/dev/null
+ source "$COMM_NIX_PATH"
+fi
-set -x
# The $PATH used by Xcode likely won't contain Cargo, fix that.
# In addition, the $PATH used by XCode has lots of Apple-specific
# developer tools that your Cargo isn't expecting to use, fix that.
# Note: This assumes a default `rustup` setup and default path.
-build_path="$HOME/.cargo/bin:/usr/local/bin:/usr/bin:/bin"
+build_path="$HOME/.cargo/bin:/usr/local/bin:/usr/bin:/bin${PATH:+:}$PATH"
# cd to Cargo project
cd "${SRCROOT}/../native_rust_library" || exit
# Add iOS targets for cross-compilation
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 3:53 PM (20 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2688318
Default Alt Text
D5479.diff (962 B)
Attached To
Mode
D5479: [iOS] Support Nix iOS dev shell
Attached
Detach File
Event Timeline
Log In to Comment