nix-community / nix-environments

Repository to maintain out-of-tree shell.nix files (maintainer=@mic92)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[request] Environment for QMK

AndersonTorres opened this issue · comments

Copy-pasting NixOS/nixpkgs#129065:

QMK is already packaged into Nixpkgs (#127863). However, it does not work standalone - it is a tool made to manipulate QMK firmware source tree.

Therefore, its best use case is inside a well-crafted shell.nix file.

Reference: NixOS/nixpkgs#134530

If it is packaged, can you not just use nix-shell <nixpkgs> -A qmk to get a build environment?

If it is packaged, can you not just use nix-shell <nixpkgs> -A qmk to get a build environment?

It is a bit complicated to explain.

QMK, as packaged by Nixpkgs, is mostly useful for download and manipulate the QMK Firmware repo. However, the other functionalities, especially compile and burn the firmware to a keyboard, require extra packages like cross-compilers and firmware loaders.

The "expected workflow" for QMK is something like:

  1. Download the qmk firmware git repo - here you use qmk tool
  2. Edit the source code to match your needs (alternative keyboard, blinking etc.) - here you use emacs or mousepad :)
  3. Compile the firmware - here you can use qmk tool if the AVR cross-compiler is found on $PATH
  4. Burn it to the keyboard - here you can use qmk tool if avrdude is found on $PATH

Ok. Pull requests are welcome. I will no likely add this as I don't use this.