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

tockloader: init at v1.4.0 #80829

Merged
merged 1 commit into from May 22, 2020
Merged

tockloader: init at v1.4.0 #80829

merged 1 commit into from May 22, 2020

Conversation

mweinelt
Copy link
Member

@mweinelt mweinelt commented Feb 22, 2020

Motivation for this change

Tockloader describes itself as a "Tool for programming Tock onto hardware boards."

Personally I'm trying to get OpenSK (https://github.com/google/OpenSK) running on a Nordic nRF52840 MDK and the deploy process requires among other things tockloader.

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 nixpkgs-review --run "nixpkgs-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.

@mweinelt
Copy link
Member Author

How is the python-packages.nix top-level file sorted?

@jonringer
Copy link
Contributor

How is the python-packages.nix top-level file sorted?

it's not.

Some additions grouped similar packages. a lot just did lexigraphical sorting.

Right now it's just a "best try"

@mweinelt
Copy link
Member Author

Updated to disable python2 support, which was failing.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

There are no tests included. Please try to checkout from source and check if they have unit tests, and try to run them. Unit tests give a good indication that they package has a high degree of validity and correctness given the python package set.

If tests are not available, then please use pythonImportsCheck to import the most important modules. This isn't as good as unit tests, but will usually give a good indication of run-time errors.


----------------------------------------------------------------------
Ran 0 tests in 0.000s

@mweinelt
Copy link
Member Author

mweinelt commented May 3, 2020

I tried importing the TockLoader class, but couldn't properly adress it. I tried tockloader.tockloader.TockLoader (package.file.class).

https://github.com/tock/tockloader/blob/master/tockloader/tockloader.py#L28

So for now I settled for the package import, which isn't very helpful.

@mweinelt
Copy link
Member Author

mweinelt commented May 3, 2020

The package has no test suite and their CI job just tries to call tockloader --version and tockloader list-known-boards.

@jonringer
Copy link
Contributor

The package has no test suite and their CI job just tries to call tockloader --version and tockloader list-known-boards.

That's.... concerning

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

is this only meant to be use as an application? (E.g $ tockloader .... )? If so, then it probably doesn't belong in python-modules. See https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#buildpythonapplication-function

@mweinelt
Copy link
Member Author

mweinelt commented May 3, 2020

Ah yeah, that is probably the case. Thanks for the link.

@mweinelt mweinelt changed the title pythonPackages.tockloader: init at v1.3.1 tockloader: init at v1.4.0 May 8, 2020
@mweinelt
Copy link
Member Author

mweinelt commented May 8, 2020

Ok, ready for review again.

meta = with lib; {
homepage = "https://github.com/tock/tockloader";
license = licenses.mit;
description = "Tool for programming Tock onto hardware boards.";
Copy link
Contributor

Choose a reason for hiding this comment

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

please add yourself as a maintainer :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair, done!

Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

Works as far as --help is concerned.

@Lassulus Lassulus merged commit fb13a1f into NixOS:master May 22, 2020
@mweinelt mweinelt deleted the pr/tockloader branch May 22, 2020 16:37
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