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

mbed-cli: 1.9.1 -> 1.10.2 #68947

Closed
wants to merge 2 commits into from
Closed

Conversation

rvolosatovs
Copy link
Member

@rvolosatovs rvolosatovs commented Sep 16, 2019

Motivation for this change

Upstream update
mbed-os-tools is added as dependency to mbed-cli
Replaces #53956
Depends on #67730 (I will remove the [WIP] from the title, once that PR is merged and this one is rebased)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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.

@tomfitzhenry
Copy link
Contributor

@rvolosatovs , is this still WIP?

@rvolosatovs
Copy link
Member Author

Still waiting for #67730 to be merged...

@rvolosatovs rvolosatovs changed the title [WIP] mbed-cli: 1.9.1 -> 1.10.1 mbed-cli: 1.9.1 -> 1.10.2 Jan 10, 2020
pkgs/development/tools/mbed-cli/default.nix Outdated Show resolved Hide resolved
pip
pyserial

# Some of mbed-os dependencies.
Copy link
Member Author

Choose a reason for hiding this comment

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

So basically mbed-cli tries to run pip to install project dependencies.
Essentially all projects using this application will have a dependency on mbed-os, and so the following is a list of most of it's dependencies(https://github.com/ARMmbed/mbed-os/blob/master/requirements.txt) - the rest do not have a Nix package.
Not fancy and will probably break if the mbed-os dependencies change.

My idea is that users could set up venv with the missing dependencies and then use the mbed-cli package with the rest.

Any (simple) idea how to handle this better?

Copy link
Contributor

Choose a reason for hiding this comment

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

for packages that require specific dependencies which don't reflect the current python ecosystem you should do something similar to aws-sam-cli

Two things that are special about it:

  • it's not in python-packages, so it can't be imported
  • it's only used as an application

If you still need to use the package in python-modules, then you will have issues

Copy link
Contributor

Choose a reason for hiding this comment

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

however, for the update story, I don't think that would be a supported usecase as it expects to be able to write to site-packages

@rvolosatovs
Copy link
Member Author

@GrahamcOfBorg build mbed-cli

@rvolosatovs
Copy link
Member Author

rvolosatovs commented Jan 10, 2020

FTR, so far I did not have much success using the Nix package and myself resort to using a Docker image:
https://github.com/rvolosatovs/infrastructure/blob/6d6ef8f9694efd8df4954552355f5ae4900dd7b9/nixpkgs/external/dockerfiles/Dockerfile.mbed#L1-L25
https://github.com/rvolosatovs/infrastructure/blob/6d6ef8f9694efd8df4954552355f5ae4900dd7b9/nixpkgs/overlays.nix#L197-L201

Ideally I would want to be able to just add the mbed package directly in shell.nix of my projects and use it, but the pip (obviously) fails and compilation of projects also failed for me before. Have not tested yet with the version in this PR.

I don't really know how to make it work.

@rvolosatovs
Copy link
Member Author

Closing this, since not clear how to proceed

@jonringer
Copy link
Contributor

this could potentially work with buildFHSUserEnv, but I don't have much experience using that utility

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

3 participants