Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3249013
D5319.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1023 B
Referenced Files
None
Subscribers
None
D5319.diff
View Options
diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix
--- a/nix/dev-shell.nix
+++ b/nix/dev-shell.nix
@@ -107,9 +107,14 @@
# shell commands to be ran upon entering shell
shellHook = ''
+ PRJ_ROOT=$(git rev-parse --show-toplevel)
+
# Set development environment variable defaults
source "${../scripts/source_development_defaults.sh}"
+ # Cache development path for some use cases such as XCode
+ "$PRJ_ROOT/scripts/save_path.sh"
+
''
# Darwin condition can be removed once linux services are supported
+ lib.optionalString stdenv.isDarwin ''
diff --git a/scripts/save_path.sh b/scripts/save_path.sh
new file mode 100755
--- /dev/null
+++ b/scripts/save_path.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+# Save the `PATH` to a known location, this is to aide with xcode which will
+# unset all environment variables before attempting builds
+
+COMM_CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/comm"
+
+mkdir -p "$COMM_CACHE"
+
+echo "export PATH=$PATH\${PATH:+:}\"\$PATH\"" > "$COMM_CACHE"/path
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 11:52 AM (19 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2497717
Default Alt Text
D5319.diff (1023 B)
Attached To
Mode
D5319: [Nix] Cache PATH between nix develop invocations
Attached
Detach File
Event Timeline
Log In to Comment