From 47bdbbda4fb1ea123feb4cc36c623f9a05ec2a69 Mon Sep 17 00:00:00 2001 From: kinnrai Date: Sat, 26 Sep 2026 00:09:49 +0800 Subject: [PATCH] python3Packages.mlx-bin: symlink mlx-metal include and share directories --- pkgs/development/python-modules/mlx/bin.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/mlx/bin.nix b/pkgs/development/python-modules/mlx/bin.nix index 6f95e064d93b..8e48a1411eea 100644 --- a/pkgs/development/python-modules/mlx/bin.nix +++ b/pkgs/development/python-modules/mlx/bin.nix @@ -53,10 +53,10 @@ buildPythonPackage (finalAttrs: { [ mlx-metal ]; postInstall = '' - # The Python wheel expects libmlx.dylib and mlx.metallib to live under - # mlx/lib next to the extension module, but those files are shipped by the - # separate mlx-metal wheel. + # Nix installs the wheels separately, but MLX expects their files in the same package directory. ln -s ${mlx-metal}/${python.sitePackages}/mlx/lib $out/${python.sitePackages}/mlx/lib + ln -s ${mlx-metal}/${python.sitePackages}/mlx/include $out/${python.sitePackages}/mlx/include + ln -s ${mlx-metal}/${python.sitePackages}/mlx/share $out/${python.sitePackages}/mlx/share ''; pythonImportsCheck = [ "mlx" ];