Skip to content

Commit

Permalink
Merge pull request #336217 from tpwrules/pr/24.05/micropython-fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak authored Aug 21, 2024
2 parents 3aa438d + 8234ac1 commit aea6e7b
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions pkgs/development/interpreters/micropython/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,35 @@ stdenv.mkDerivation rec {
owner = "micropython";
repo = "micropython";
rev = "v${version}";
sha256 = "sha256-sdok17HvKub/sI+8cAIIDaLD/3mu8yXXqrTOej8/UfU=";
sha256 = "sha256-7AA9n6UQchY6POkOp1VWAOAo87uRJSeCBhgvVXLoE04=";
fetchSubmodules = true;

# remove unused libaries from rp2 port's SDK. we leave this and the other
# ports around for users who want to override makeFlags flags to build them.
# https://github.com/micropython/micropython/blob/a61c446c0b34e82aeb54b9770250d267656f2b7f/ports/rp2/CMakeLists.txt#L17-L22
#
# shrinks uncompressed NAR by ~2.4G (though it is still large). there
# doesn't seem to be a way to avoid fetching them in the first place.
postFetch = ''
rm -rf $out/lib/pico-sdk/lib/{tinyusb,lwip,btstack}
'';
};


nativeBuildInputs = [ pkg-config python3 ];

buildInputs = [ libffi readline ];

buildPhase = ''
runHook preBuild
make -C mpy-cross
make -C ports/unix
runHook postBuild
'';
makeFlags = [ "-C" "ports/unix" ]; # also builds mpy-cross

enableParallelBuilding = true;

doCheck = true;

__darwinAllowLocalNetworking = true; # needed for select_poll_eintr test

skippedTests = " -e select_poll_fd"
+ lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) " -e ffi_callback"
+ lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) " -e ffi_callback -e float_parse -e float_parse_doubleproc"
+ lib.optionalString (stdenv.isLinux && stdenv.isAarch64) " -e float_parse"
;

Expand Down

0 comments on commit aea6e7b

Please sign in to comment.