Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33017565
D5479.1768380783.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
962 B
Referenced Files
None
Subscribers
None
D5479.1768380783.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
Wed, Jan 14, 8:53 AM (2 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5930377
Default Alt Text
D5479.1768380783.diff (962 B)
Attached To
Mode
D5479: [iOS] Support Nix iOS dev shell
Attached
Detach File
Event Timeline
Log In to Comment