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'.
This commit is contained in:
parent
2c0a6e1ea0
commit
33723434a8
|
@ -206,6 +206,8 @@ in stdenv.mkDerivation rec {
|
||||||
# https://github.com/rust-lang/rust/issues/30181
|
# https://github.com/rust-lang/rust/issues/30181
|
||||||
# enableParallelBuilding = false;
|
# enableParallelBuilding = false;
|
||||||
|
|
||||||
|
setupHooks = ./setup-hook.sh;
|
||||||
|
|
||||||
requiredSystemFeatures = [ "big-parallel" ];
|
requiredSystemFeatures = [ "big-parallel" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# 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
|
Loading…
Reference in New Issue