-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add QMK keyboard firmware environment (#5)
This environment only contains a single package, but under that package is a host of cross-compilers for embedded targets that's often a huge pain to set up properly. Whimsy. --------- Co-authored-by: Rok Garbas <rok@flox.dev>
- Loading branch information
Showing
7 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
run/ | ||
cache/ | ||
lib/ | ||
log/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "qmk", | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"lockfile-version":1,"manifest":{"build":{},"hook":{"on-activate":""},"install":{"qmk":{"pkg-path":"qmk"}},"options":{"allow":{"licenses":[]},"semver":{},"systems":["aarch64-darwin","aarch64-linux","x86_64-darwin","x86_64-linux"]},"profile":{"common":"echo \"\"\necho \" ╔═════════════════════════════════════╗\"\necho \" ║ ║\"\necho \" ║ Compile and flash your firmware: ║\"\necho \" ║ 👉 qmk setup ║\"\necho \" ║ 👉 qmk compile ║\"\necho \" ║ 👉 qmk flash ║\"\necho \" ║ ║\"\necho \" ║ Read: https://docs.qmk.fm/newbs ║\"\necho \" ║ ║\"\necho \" ╚═════════════════════════════════════╝\"\necho \"\"\n"},"services":{},"vars":{},"version":1},"packages":[{"attr_path":"qmk","broken":false,"derivation":"/nix/store/8yml7k9w3khmy4wq3sb92235c8vk16p5-qmk-1.1.5.drv","description":"Program to help users work with QMK Firmware","group":"toplevel","install_id":"qmk","license":"MIT","locked_url":"https://github.com/flox/nixpkgs?rev=4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","name":"qmk-1.1.5","outputs":{"dist":"/nix/store/a2zdg3xq5mayzxyh3xj5fm2dj79y4sp2-qmk-1.1.5-dist","out":"/nix/store/wvrgkzifqidf442bpaiy6jxc6w6x4xiz-qmk-1.1.5"},"outputs_to_install":["out"],"pname":"qmk","priority":5,"rev":"4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","rev_count":694395,"rev_date":"2024-10-18T13:02:40Z","scrape_date":"2024-10-20T03:56:48Z","stabilities":["unstable"],"system":"aarch64-darwin","unfree":false,"version":"1.1.5"},{"attr_path":"qmk","broken":false,"derivation":"/nix/store/z56iypljiz3pcxbnvrngbh7x1x4gj8sv-qmk-1.1.5.drv","description":"Program to help users work with QMK Firmware","group":"toplevel","install_id":"qmk","license":"MIT","locked_url":"https://github.com/flox/nixpkgs?rev=4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","name":"qmk-1.1.5","outputs":{"dist":"/nix/store/ncy71cij4w6s5503i2lavgr44n8rwy73-qmk-1.1.5-dist","out":"/nix/store/40nz4rzkygh844akl3xrn7b8zbb8rbfx-qmk-1.1.5"},"outputs_to_install":["out"],"pname":"qmk","priority":5,"rev":"4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","rev_count":694395,"rev_date":"2024-10-18T13:02:40Z","scrape_date":"2024-10-20T03:56:48Z","stabilities":["unstable"],"system":"aarch64-linux","unfree":false,"version":"1.1.5"},{"attr_path":"qmk","broken":false,"derivation":"/nix/store/vlsf6163g6mvdi6pvmw7yj0xai8slgz1-qmk-1.1.5.drv","description":"Program to help users work with QMK Firmware","group":"toplevel","install_id":"qmk","license":"MIT","locked_url":"https://github.com/flox/nixpkgs?rev=4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","name":"qmk-1.1.5","outputs":{"dist":"/nix/store/4h1xm7fn6qaxz7ji0xhilf5j920anark-qmk-1.1.5-dist","out":"/nix/store/aav197h6sxlx05qrclviphaxxqs2mcxm-qmk-1.1.5"},"outputs_to_install":["out"],"pname":"qmk","priority":5,"rev":"4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","rev_count":694395,"rev_date":"2024-10-18T13:02:40Z","scrape_date":"2024-10-20T03:56:48Z","stabilities":["unstable"],"system":"x86_64-darwin","unfree":false,"version":"1.1.5"},{"attr_path":"qmk","broken":false,"derivation":"/nix/store/6a7wjjcxnrg7gmkqay742l7c5hhdhrm9-qmk-1.1.5.drv","description":"Program to help users work with QMK Firmware","group":"toplevel","install_id":"qmk","license":"MIT","locked_url":"https://github.com/flox/nixpkgs?rev=4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","name":"qmk-1.1.5","outputs":{"dist":"/nix/store/bdsjgr9qvnrv85azwx4apgxa6wk2qsib-qmk-1.1.5-dist","out":"/nix/store/9cvvhxx94p6fr53wgsnhs5qi3vsp73vk-qmk-1.1.5"},"outputs_to_install":["out"],"pname":"qmk","priority":5,"rev":"4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","rev_count":694395,"rev_date":"2024-10-18T13:02:40Z","scrape_date":"2024-10-20T03:56:48Z","stabilities":["unstable"],"system":"x86_64-linux","unfree":false,"version":"1.1.5"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version = 1 | ||
|
||
[install] | ||
# That's literally it, that's all you need | ||
qmk.pkg-path = "qmk" | ||
|
||
[vars] | ||
|
||
[hook] | ||
on-activate = ''' | ||
''' | ||
|
||
[profile] | ||
common = ''' | ||
echo "" | ||
echo " ╔═════════════════════════════════════╗" | ||
echo " ║ ║" | ||
echo " ║ Compile and flash your firmware: ║" | ||
echo " ║ 👉 qmk setup ║" | ||
echo " ║ 👉 qmk compile ║" | ||
echo " ║ 👉 qmk flash ║" | ||
echo " ║ ║" | ||
echo " ║ Read: https://docs.qmk.fm/newbs ║" | ||
echo " ║ ║" | ||
echo " ╚═════════════════════════════════════╝" | ||
echo "" | ||
''' | ||
|
||
[services] | ||
|
||
[options] | ||
systems = [ | ||
"aarch64-darwin", | ||
"aarch64-linux", | ||
"x86_64-darwin", | ||
"x86_64-linux", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/qmk_firmware/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eo pipefail | ||
|
||
check_command() { | ||
if ! command -v $1 2>&1 >/dev/null | ||
then | ||
echo "Error: '$1' command could not be found." | ||
exit 1 | ||
fi | ||
} | ||
|
||
check_command qmk | ||
|
||
|
||
qmk clone | ||
echo ">>> QMK firmware cloned" | ||
|
||
qmk setup -H $PWD/qmk_firmware --yes | ||
echo ">>> QMK firmware setup" | ||
|
||
qmk compile -kb clueboard/66/rev3 -km default | ||
echo ">>> QMK firmware compiled" |