google-cloud-sdk: fix build determinism (#454750)
This commit is contained in:
@@ -87,6 +87,9 @@ stdenv.mkDerivation rec {
|
||||
./gsutil-disable-updates.patch
|
||||
];
|
||||
|
||||
# Prevent Python from writing bytecode to ensure build determinism
|
||||
PYTHONDONTWRITEBYTECODE = "1";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@@ -161,8 +164,6 @@ 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)"
|
||||
'';
|
||||
|
||||
@@ -78,11 +78,12 @@ symlinkJoin {
|
||||
]
|
||||
++ comps;
|
||||
|
||||
# Prevent Python from writing bytecode to ensure build determinism
|
||||
PYTHONDONTWRITEBYTECODE = "1";
|
||||
|
||||
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