nixpkgs/pkgs/development/compilers/rust/setup-hook.sh
Eelco Dolstra 33723434a8 rustc: Add setup hook to set $CARGO_HOME
This works around 'failed to open:
/homeless-shelter/.cargo/.package-cache' with Rust 1.36 even when
we're using 'cargo --frozen'.
2019-07-07 15:18:09 +02:00

5 lines
161 B
Bash

# Fix 'failed to open: /homeless-shelter/.cargo/.package-cache' in rust 1.36.
if [[ -z $IN_NIX_SHELL && -z $CARGO_HOME ]]; then
export CARGO_HOME=$TMPDIR
fi