-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.envrc
More file actions
15 lines (14 loc) · 730 Bytes
/
Copy path.envrc
File metadata and controls
15 lines (14 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Guix development environment
if [[ -d /run/current-system ]]; then
eval "$(guix shell -m manifest.scm --search-paths)"
export LD_LIBRARY_PATH="$LIBRARY_PATH:$LD_LIBRARY_PATH"
export OPENSSL_DIR="$(dirname "$(dirname "$(command -v openssl)")")"
# The manifest deliberately ships no rust (Guix is on 1.93, sqlx 0.9 wants
# 1.94), so pick up the newest rustup toolchain instead. Guix has no `cc` and
# rustup's bundled lld shim can't run off an FHS layout, hence the RUSTFLAGS.
rustup_bin=$(ls -d "$HOME"/.rustup/toolchains/*/bin 2>/dev/null | sort -V | tail -1)
if [[ -n $rustup_bin ]]; then
PATH_add "$rustup_bin"
export RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }-C linker=gcc -C linker-features=-lld"
fi
fi