--- magic/loader.py.orig	2021-06-03 16:42:29.000000000 +0300
+++ magic/loader.py	2021-06-17 12:33:48.000000000 +0300
@@ -11,10 +11,8 @@
   if sys.platform == 'darwin':
 
     paths = [
-      '/opt/local/lib',
-      '/usr/local/lib',
-      '/opt/homebrew/lib',
-    ] + glob.glob('/usr/local/Cellar/libmagic/*/lib')
+      '__PREFIX__/lib',
+    ]
 
     for i in paths:
       yield os.path.join(i, 'libmagic.dylib')
