Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

micropython: init at 1.12 #74964

Merged
merged 1 commit into from Jan 3, 2020
Merged

Conversation

stigtsp
Copy link
Member

@stigtsp stigtsp commented Dec 4, 2019

Motivation for this change

This PR adds the unix port of MicroPython. A lean implementation of Python 3 for microcontrollers.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed points
  • package path fits guidelines
  • package name fits guidelines
  • package version fits guidelines
  • package build on x86_64
  • executables tested on x86_64
  • meta.description is set and fits guidelines
  • meta.license fits upstream license
  • meta.platforms is set
  • meta.maintainers is set
  • build time only dependencies are declared in nativeBuildInputs
  • source is fetched using the appropriate function
  • phases are respected
Possible improvements
Comments

Thanks for your contribution! ✨

@prusnak
Copy link
Member

prusnak commented Dec 4, 2019

@stigtsp Do you have any usecase for this? As it is packaged now it just produces Unix binary, which is not very useful.

@stigtsp stigtsp force-pushed the package/micropython-init branch 2 times, most recently from 9e764e9 to ae7c09a Compare December 4, 2019 23:07
@stigtsp
Copy link
Member Author

stigtsp commented Dec 4, 2019

Are pkgconfig and python3 build time only dependencies? Then they belong in nativeBuildInputs.

Thanks for the review, python3 and pkgconfig have been added to nativeBuildInputs.

@stigtsp
Copy link
Member Author

stigtsp commented Dec 4, 2019

Do you have any usecase for this?

I'm using the linux build to write networking code for ESP8266/ESP32 locally rather than directly on the microcontroller. Maybe this is useful for other nixpkgs users as well.

As it is packaged now it just produces Unix binary, which is not very useful.

It's quite nice if you write micropython code, and want to run it on Linux. The binary contains a standard library with ussl, usocket, upip, etc.

You can for example use it to install micropython-libs in $HOME/.micropython by running micropython -m upip install umqtt.simple

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my previous comment for details

@stigtsp stigtsp requested a review from FRidh December 5, 2019 14:56
@stigtsp
Copy link
Member Author

stigtsp commented Jan 3, 2020

Are there any issues preventing this PR from being merged?

Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase. Would be good to check whether makeFlags can be used instead. Otherwise, looks good to me.

@stigtsp stigtsp changed the title micropython: init at 1.11 micropython: init at 1.12 Jan 3, 2020
@stigtsp
Copy link
Member Author

stigtsp commented Jan 3, 2020

Updated PR with new upstream 1.11 -> 1.12

@FRidh FRidh merged commit 76bd004 into NixOS:master Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants