flutter: Allow overriding the FLUTTER_CACHE_DIR

This commit is contained in:
hacker1024 2023-10-23 00:19:45 +11:00 committed by Maciej Krüger
parent 175112a996
commit e22019bc2f
No known key found for this signature in database
GPG key ID: 0D948CE19CF49C5F

View file

@ -120,7 +120,7 @@ let
# We do not patch it since the script doesn't require engine artifacts(which are the only thing not added by the unwrapped derivation), so it shouldn't fail, and patching it will just be harder to maintain.
immutableFlutter = writeShellScript "flutter_immutable" ''
export PUB_CACHE=''${PUB_CACHE:-"$HOME/.pub-cache"}
export FLUTTER_CACHE_DIR=${cacheDir}
export FLUTTER_CACHE_DIR=''${FLUTTER_CACHE_DIR:-'${cacheDir}'}
${flutter}/bin/flutter "$@"
'';