Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NIx flake to package the PiShock tool for Nix systems. esptool is also bundled for flashing.
Using this flake, Nix users will can add the pishock command to their environment, or create ephemeral shells where the command can be used.
Testing
This can be tested manually on any machine that has access to the Nix package manager. The ability to build can be proven with the
nix build
command in the same directory as the flake, andnix shell
will create a shell where the pishock command will be available. Adding the flake to your nix configuration will make the command available in the users default environment. Enabling flake support may be required.Considerations
This implementation packages the wheel package from pypi, and pulls in python package dependencies from nixpkgs-unstable. These versions are pinned in the
flake.lock
file. This approach works, but does not necessarily use dependency versions tested by upstream. Therefore I would be happy to work in this PR to use poetry2nix, which will be able to package using python dependencies frompoetry.lock
.Additionally, I am using flake-utils to target all platforms supported by Nix. However I hove only been able to test with x86_64-linux. If you see reason to exclude or limit to specific platforms, let me know.