From 7baf5a984d40618abc1a53de6c678d2ba8cd7bbe Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 11 Oct 2025 15:32:42 -0700 Subject: [PATCH] rocmPackages.hipblaslt: verify .dat files aren't huge in preInstallCheck let's avoid regressing compression in future, oops --- .../rocm-modules/6/hipblaslt/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/rocm-modules/6/hipblaslt/default.nix b/pkgs/development/rocm-modules/6/hipblaslt/default.nix index 61328d5cd867..e8061a50b92f 100644 --- a/pkgs/development/rocm-modules/6/hipblaslt/default.nix +++ b/pkgs/development/rocm-modules/6/hipblaslt/default.nix @@ -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