Add a Nix derivation for working with tmk_keyboard #619
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.
Background: Nix is a package manager which, among other things, allows for packages to be installed in a single shell's environment. It's the package manager of the NixOS Linux distribution, but also sees some use outside of that ecosystem. Generally, Nix users avoid installing build tools globally and instead prefer to spawn temporary shells which contain the tools they need for a particular project.
This patch adds a Nix derivation (basically a package description) which makes the
avr-gcc
toolchain anddfu-programmer
available on the user's$PATH
. It allows one to runnix-shell
and proceed to immediately begin building keyboard firmware, essentially skipping the "Download & Install" step of the build guide.I based this off the Nix derivation used by
qmk_firmware
. It works well enough to install new firmware to my HHKB Pro JP with the USB controller, but I did not test it for any other models. It also doesn't support other flashing methods besidesdfu-programmer
.