about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authora-n-n-a-l-e-e <150648636+a-n-n-a-l-e-e@users.noreply.github.com>2024-04-02 14:32:28 -0700
committerGitHub <noreply@github.com>2024-04-02 14:32:28 -0700
commit3d06f31552c39590a4f54e527afbbf9d3a485e4a (patch)
tree8e9200d0c701b8b433549ebdb86f1001a763ff4f /pkgs/build-support
parentf7c12586bee29c7a036862626328ec3a64684393 (diff)
parent83440df1f6c29e0fcf7dfba1e9a95138d892e703 (diff)
Merge pull request #301011 from philiptaron/remove-auditBlasHook
auditBlasHook: remove
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/setup-hooks/audit-blas.sh37
1 files changed, 0 insertions, 37 deletions
diff --git a/pkgs/build-support/setup-hooks/audit-blas.sh b/pkgs/build-support/setup-hooks/audit-blas.sh
deleted file mode 100644
index 6a40073fb2345..0000000000000
--- a/pkgs/build-support/setup-hooks/audit-blas.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-# Ensure that we are always linking against “libblas.so.3” and
-# “liblapack.so.3”.
-
-auditBlas() {
-    local dir="$prefix"
-    [ -e "$dir" ] || return 0
-
-    local i
-    while IFS= read -r -d $'\0' i; do
-        if ! isELF "$i"; then continue; fi
-
-        if $OBJDUMP -p "$i" | grep 'NEEDED' | awk '{ print $2; }' | grep -q '\(libmkl_rt.so\|libopenblas.so.0\)'; then
-            echo "$i refers to a specific implementation of BLAS or LAPACK."
-            echo "This prevents users from switching BLAS/LAPACK implementations."
-            echo "Add \`blas' or \`lapack' to buildInputs instead of \`mkl' or \`openblas'."
-            exit 1
-        fi
-
-        (IFS=:
-         for dir in "$(patchelf --print-rpath "$i")"; do
-             if [ -f "$dir/libblas.so.3" ] || [ -f "$dir/libblas.so" ]; then
-                 if [ "$dir" != "@blas@/lib" ]; then
-                     echo "$dir is not allowed to contain a library named libblas.so.3"
-                     exit 1
-                 fi
-             fi
-             if [ -f "$dir/liblapack.so.3" ] || [ -f "$dir/liblapack.so" ]; then
-                 if [ "$dir" != "@lapack@/lib" ]; then
-                     echo "$dir is not allowed to contain a library named liblapack.so.3"
-                     exit 1
-                 fi
-             fi
-         done)
-    done < <(find "$dir" -type f -print0)
-}
-
-fixupOutputHooks+=(auditBlas)