Files
nixpkgs/pkgs/by-name/mi/micropython/fix-mpy-cross-path.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
455 B
Diff
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
--- a/mpy-cross/mpy_cross/__init__.py
+++ b/mpy-cross/mpy_cross/__init__.py
@@ -61,6 +61,10 @@
def _find_mpy_cross_binary(mpy_cross):
if mpy_cross:
return mpy_cross
+ # Check for MPY_CROSS environment variable first (for cross-compilation)
+ env_mpy_cross = os.environ.get("MPY_CROSS")
+ if env_mpy_cross:
+ return env_mpy_cross
return os.path.abspath(os.path.join(os.path.dirname(__file__), "../build/mpy-cross"))