python3Packages.mlx: 0.28.0 -> 0.30.1 (#471885)

This commit is contained in:
Aleksana
2025-12-21 14:24:07 +00:00
committed by GitHub
2 changed files with 9 additions and 19 deletions
@@ -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)
@@ -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 = {
@@ -154,9 +142,10 @@ let
license = lib.licenses.mit;
platforms = [ "aarch64-darwin" ];
maintainers = with lib.maintainers; [
viraptor
Gabriella439
booxter
cameronyule
viraptor
];
};
};