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

micropython: init at 1.12 #74964

merged 1 commit into from Jan 3, 2020

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.
@stigtsp stigtsp force-pushed the stigtsp:package/micropython-init branch 4 times, most recently from f00dd70 to 1db61a3 Dec 4, 2019
Copy link
Member

@davidak davidak left a comment

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 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 stigtsp:package/micropython-init branch 2 times, most recently from 9e764e9 to ae7c09a Dec 4, 2019
@stigtsp
Copy link
Member Author

@stigtsp 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 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

@davidak
davidak approved these changes Dec 5, 2019
Copy link
Member

@davidak davidak left a comment

see my previous comment for details

@stigtsp stigtsp requested a review from FRidh Dec 5, 2019
@stigtsp
Copy link
Member Author

@stigtsp stigtsp commented Jan 3, 2020

Are there any issues preventing this PR from being merged?

@FRidh
FRidh approved these changes Jan 3, 2020
Copy link
Member

@FRidh FRidh left a comment

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

@stigtsp stigtsp force-pushed the stigtsp:package/micropython-init branch from ae7c09a to 9e633f5 Jan 3, 2020
@stigtsp stigtsp changed the title micropython: init at 1.11 micropython: init at 1.12 Jan 3, 2020
@stigtsp
Copy link
Member Author

@stigtsp 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
1 check was pending
1 check was pending
grahamcofborg-eval Checking new out paths
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.