Loading pkgs/development/python-modules/mlx/default.nix +115 −112 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, replaceVars, Loading @@ -22,6 +23,9 @@ pytestCheckHook, python, runCommand, # passthru mlx, }: let Loading @@ -33,7 +37,8 @@ let hash = "sha256-15FvyPOFqTOr5vdWQoPnZz+mYH919++EtghjozDlnSA="; }; mlx = buildPythonPackage rec { in buildPythonPackage (finalAttrs: { pname = "mlx"; version = "0.30.1"; pyproject = true; Loading @@ -41,7 +46,7 @@ let src = fetchFromGitHub { owner = "ml-explore"; repo = "mlx"; tag = "v${version}"; tag = "v${finalAttrs.version}"; hash = "sha256-Vt0RH+70VBwUjXSfPTsNdRS3g0ookJHhzf2kvgEtgH8="; }; Loading @@ -56,7 +61,7 @@ let --replace-fail "nanobind==2.10.2" "nanobind" substituteInPlace mlx/backend/cpu/jit_compiler.cpp \ --replace-fail "g++" "$CXX" --replace-fail "g++" "${lib.getExe' stdenv.cc "c++"}" ''; dontUseCmakeConfigure = true; Loading Loading @@ -123,11 +128,11 @@ let nativeBuildInputs = [ python ]; } '' cp ${src}/examples/python/logistic_regression.py . cp ${finalAttrs.src}/examples/python/logistic_regression.py . ${python.interpreter} logistic_regression.py rm logistic_regression.py cp ${src}/examples/python/linear_regression.py . cp ${finalAttrs.src}/examples/python/linear_regression.py . ${python.interpreter} linear_regression.py rm linear_regression.py Loading @@ -138,7 +143,7 @@ let meta = { homepage = "https://github.com/ml-explore/mlx"; description = "Array framework for Apple silicon"; changelog = "https://github.com/ml-explore/mlx/releases/tag/${src.tag}"; changelog = "https://github.com/ml-explore/mlx/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; platforms = [ "aarch64-darwin" ]; maintainers = with lib.maintainers; [ Loading @@ -148,6 +153,4 @@ let viraptor ]; }; }; in mlx }) Loading
pkgs/development/python-modules/mlx/default.nix +115 −112 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, replaceVars, Loading @@ -22,6 +23,9 @@ pytestCheckHook, python, runCommand, # passthru mlx, }: let Loading @@ -33,7 +37,8 @@ let hash = "sha256-15FvyPOFqTOr5vdWQoPnZz+mYH919++EtghjozDlnSA="; }; mlx = buildPythonPackage rec { in buildPythonPackage (finalAttrs: { pname = "mlx"; version = "0.30.1"; pyproject = true; Loading @@ -41,7 +46,7 @@ let src = fetchFromGitHub { owner = "ml-explore"; repo = "mlx"; tag = "v${version}"; tag = "v${finalAttrs.version}"; hash = "sha256-Vt0RH+70VBwUjXSfPTsNdRS3g0ookJHhzf2kvgEtgH8="; }; Loading @@ -56,7 +61,7 @@ let --replace-fail "nanobind==2.10.2" "nanobind" substituteInPlace mlx/backend/cpu/jit_compiler.cpp \ --replace-fail "g++" "$CXX" --replace-fail "g++" "${lib.getExe' stdenv.cc "c++"}" ''; dontUseCmakeConfigure = true; Loading Loading @@ -123,11 +128,11 @@ let nativeBuildInputs = [ python ]; } '' cp ${src}/examples/python/logistic_regression.py . cp ${finalAttrs.src}/examples/python/logistic_regression.py . ${python.interpreter} logistic_regression.py rm logistic_regression.py cp ${src}/examples/python/linear_regression.py . cp ${finalAttrs.src}/examples/python/linear_regression.py . ${python.interpreter} linear_regression.py rm linear_regression.py Loading @@ -138,7 +143,7 @@ let meta = { homepage = "https://github.com/ml-explore/mlx"; description = "Array framework for Apple silicon"; changelog = "https://github.com/ml-explore/mlx/releases/tag/${src.tag}"; changelog = "https://github.com/ml-explore/mlx/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; platforms = [ "aarch64-darwin" ]; maintainers = with lib.maintainers; [ Loading @@ -148,6 +153,4 @@ let viraptor ]; }; }; in mlx })