10 stdenv.mkDerivation rec {
11 pname = "micropython";
14 src = fetchFromGitHub {
15 owner = "micropython";
18 hash = "sha256-sfJohmsqq5FumUoVE8x3yWv12DiCJJXae62br0j+190=";
19 fetchSubmodules = true;
22 nativeBuildInputs = [ pkg-config python3 ];
24 buildInputs = [ libffi readline ];
35 skippedTests = " -e select_poll_fd"
36 + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) " -e ffi_callback"
37 + lib.optionalString (stdenv.isLinux && stdenv.isAarch64) " -e float_parse"
43 ${python3.interpreter} ./run-tests.py ${skippedTests}
51 install -Dm755 ports/unix/build-standard/micropython -t $out/bin
52 install -Dm755 mpy-cross/build/mpy-cross -t $out/bin
57 description = "Lean and efficient Python implementation for microcontrollers and constrained systems";
58 homepage = "https://micropython.org";
59 platforms = platforms.unix;
60 license = licenses.mit;
61 maintainers = with maintainers; [ prusnak sgo ];