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

Added Nix flake #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Added Nix flake #1

wants to merge 1 commit into from

Conversation

sirris-bat
Copy link

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, and nix 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 from poetry.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant