rocmPackages.hipblaslt: verify .dat files aren't huge in preInstallCheck

let's avoid regressing compression in future, oops
This commit is contained in:
Luna Nova
2025-10-11 18:03:05 -07:00
parent 987e5a2749
commit 7baf5a984d
@@ -125,7 +125,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
doCheck = false;
doInstallCheck = false;
doInstallCheck = true;
nativeBuildInputs = [
cmake
@@ -213,6 +213,18 @@ stdenv.mkDerivation (finalAttrs: {
rmdir $out/bin
'';
installCheckPhase =
# Verify compression worked and .dat files aren't huge
''
runHook preInstallCheck
find "$out" -type f -name "*.dat" -size "+2M" -exec sh -c '
echo "ERROR: oversized .dat file, check for issues with install compression: {}" >&2
exit 1
' {} \;
echo "Verified .dat files in $out are not huge"
runHook postInstallCheck
'';
# If this is false there are no kernels in the output lib
# supporting the target device
# so if it's an optional dep it's best to not depend on it