From a37788bd7ae058f3874af077e9efaf8ead209c5d Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 18 Dec 2025 00:11:33 -0500 Subject: [PATCH 1/2] python3Packages.mlx: 0.28.0 -> 0.30.1 --- .../mlx/darwin-build-fixes.patch | 5 +++-- .../python-modules/mlx/default.nix | 20 ++++--------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/mlx/darwin-build-fixes.patch b/pkgs/development/python-modules/mlx/darwin-build-fixes.patch index b7770a4538f5..e25e6da7d070 100644 --- a/pkgs/development/python-modules/mlx/darwin-build-fixes.patch +++ b/pkgs/development/python-modules/mlx/darwin-build-fixes.patch @@ -2,13 +2,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index ab8aea44..9e1b06f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -100,9 +100,7 @@ elseif(MLX_BUILD_METAL) +@@ -100,10 +100,7 @@ elseif(MLX_BUILD_METAL) endif() # Throw an error if xcrun not found - execute_process( - COMMAND zsh "-c" "/usr/bin/xcrun -sdk macosx --show-sdk-version" -- OUTPUT_VARIABLE MACOS_SDK_VERSION COMMAND_ERROR_IS_FATAL ANY) +- OUTPUT_VARIABLE MACOS_SDK_VERSION +- OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY) + set(MACOS_SDK_VERSION @sdkVersion@) if(${MACOS_SDK_VERSION} LESS 14.0) diff --git a/pkgs/development/python-modules/mlx/default.nix b/pkgs/development/python-modules/mlx/default.nix index 9aec1b175c76..496d2cd9afe1 100644 --- a/pkgs/development/python-modules/mlx/default.nix +++ b/pkgs/development/python-modules/mlx/default.nix @@ -1,6 +1,5 @@ { lib, - stdenv, buildPythonPackage, fetchFromGitHub, replaceVars, @@ -36,14 +35,14 @@ let mlx = buildPythonPackage rec { pname = "mlx"; - version = "0.28.0"; + version = "0.30.1"; pyproject = true; src = fetchFromGitHub { owner = "ml-explore"; repo = "mlx"; tag = "v${version}"; - hash = "sha256-+2dVZ89a09q8mWIbv6fBsySp7clzRV1tOyqr5hjFrNU="; + hash = "sha256-Vt0RH+70VBwUjXSfPTsNdRS3g0ookJHhzf2kvgEtgH8="; }; patches = [ @@ -54,7 +53,7 @@ let postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail "nanobind==2.4.0" "nanobind>=2.4.0" + --replace-fail "nanobind==2.10.2" "nanobind" substituteInPlace mlx/backend/cpu/jit_compiler.cpp \ --replace-fail "g++" "$CXX" @@ -73,7 +72,7 @@ let passthru.skipBulkUpdate = true; env = { - PYPI_RELEASE = version; + DEV_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 @@ -114,17 +113,6 @@ let "python/tests/" ]; - disabledTests = [ - # AssertionError - "test_numpy_conv" - "test_tensordot" - ]; - - disabledTestPaths = [ - # AssertionError - "python/tests/test_blas.py" - ]; - # Additional testing by executing the example Python scripts supplied with mlx # using the version of the library we've built. passthru.tests = { From 249b7236fe5913af2403e6db45e697e6aea64e85 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 18 Dec 2025 00:12:19 -0500 Subject: [PATCH 2/2] python3Packages.mlx: add booxter as maintainer --- pkgs/development/python-modules/mlx/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/mlx/default.nix b/pkgs/development/python-modules/mlx/default.nix index 496d2cd9afe1..04c857e1cdab 100644 --- a/pkgs/development/python-modules/mlx/default.nix +++ b/pkgs/development/python-modules/mlx/default.nix @@ -142,9 +142,10 @@ let license = lib.licenses.mit; platforms = [ "aarch64-darwin" ]; maintainers = with lib.maintainers; [ - viraptor Gabriella439 + booxter cameronyule + viraptor ]; }; };