google-cloud-sdk: ensure determinism by not writing python bytecode (#452502)
This commit is contained in:
@@ -161,6 +161,8 @@ stdenv.mkDerivation rec {
|
||||
installCheckPhase = ''
|
||||
# Avoid trying to write logs to homeless-shelter
|
||||
export HOME=$(mktemp -d)
|
||||
# Prevent Python from writing bytecode to ensure build determinism
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
$out/bin/gcloud version --format json | jq '."Google Cloud SDK"' | grep "${version}"
|
||||
$out/bin/gsutil version | grep -w "$(cat platform/gsutil/VERSION)"
|
||||
'';
|
||||
|
||||
@@ -81,6 +81,8 @@ symlinkJoin {
|
||||
postBuild = ''
|
||||
sed -i ';' $out/google-cloud-sdk/bin/.gcloud-wrapped
|
||||
sed -i -e "s#${google-cloud-sdk}#$out#" "$out/google-cloud-sdk/bin/gcloud"
|
||||
# Prevent Python from writing bytecode to ensure build determinism
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
${installCheck}
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user