From e4c5e1448e88b7776a19eda42554049b7a18f352 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Mon, 20 Jul 2026 19:03:21 -0400 Subject: [PATCH 1/2] python3Packages.mlx: remove x86_64-darwin support --- .../python-modules/mlx/default.nix | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/mlx/default.nix b/pkgs/development/python-modules/mlx/default.nix index b21b0223778f..b6937c9d78c8 100644 --- a/pkgs/development/python-modules/mlx/default.nix +++ b/pkgs/development/python-modules/mlx/default.nix @@ -74,22 +74,17 @@ buildPythonPackage (finalAttrs: { env = { PYPI_RELEASE = 1; - CMAKE_ARGS = toString ( - [ - # NOTE The `metal` command-line utility used to build the Metal kernels is not open-source. - # To build mlx with Metal support in Nix, you'd need to use one of the sandbox escape - # hatches which let you interact with a native install of Xcode, such as `composeXcodeWrapper` - # or by changing the upstream (e.g., https://github.com/zed-industries/zed/discussions/7016). - (lib.cmakeBool "MLX_BUILD_METAL" false) - (lib.cmakeBool "USE_SYSTEM_FMT" true) - (lib.cmakeOptionType "filepath" "FETCHCONTENT_SOURCE_DIR_GGUFLIB" "${gguf-tools}") - (lib.cmakeOptionType "filepath" "FETCHCONTENT_SOURCE_DIR_NANOBIND" "${nanobind.src}") - (lib.cmakeFeature "CMAKE_CXX_FLAGS" "-I${lib.getDev nlohmann_json}/include/nlohmann") - ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ - (lib.cmakeBool "MLX_ENABLE_X64_MAC" true) - ] - ); + CMAKE_ARGS = toString [ + # NOTE The `metal` command-line utility used to build the Metal kernels is not open-source. + # To build mlx with Metal support in Nix, you'd need to use one of the sandbox escape + # hatches which let you interact with a native install of Xcode, such as `composeXcodeWrapper` + # or by changing the upstream (e.g., https://github.com/zed-industries/zed/discussions/7016). + (lib.cmakeBool "MLX_BUILD_METAL" false) + (lib.cmakeBool "USE_SYSTEM_FMT" true) + (lib.cmakeOptionType "filepath" "FETCHCONTENT_SOURCE_DIR_GGUFLIB" "${gguf-tools}") + (lib.cmakeOptionType "filepath" "FETCHCONTENT_SOURCE_DIR_NANOBIND" "${nanobind.src}") + (lib.cmakeFeature "CMAKE_CXX_FLAGS" "-I${lib.getDev nlohmann_json}/include/nlohmann") + ]; }; build-system = [ From c7f4c87b9c5d764d4acbd88abb59e4eb4c930836 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Mon, 20 Jul 2026 19:03:54 -0400 Subject: [PATCH 2/2] python3Packages.mlx: remove obsolete disabledTests entry The skipped test was fixed in 0.31.2. --- pkgs/development/python-modules/mlx/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/mlx/default.nix b/pkgs/development/python-modules/mlx/default.nix index b6937c9d78c8..4db98899b12d 100644 --- a/pkgs/development/python-modules/mlx/default.nix +++ b/pkgs/development/python-modules/mlx/default.nix @@ -113,11 +113,7 @@ buildPythonPackage (finalAttrs: { "python/tests/" ]; - disabledTests = [ - # brittle memory leak test, see: https://github.com/ml-explore/mlx/pull/3088 - "test_siblings_without_eval" - ] - ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64) [ + disabledTests = lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64) [ # Segmentation fault "test_lapack" "test_multivariate_normal"