2cdf8346a9
`qmk flash` disappeared from the `qmk` command itself. See `qmk_cli/script_qmk.py`: ``` This program can be run from anywhere, with or without a qmk_firmware repository. If a qmk_firmware repository can be located we will use that to augment our available subcommands. ``` By pointing QMK_HOME to our firmware sources, we can make it re-appear. Change-Id: I5348fff546e864773063fb1f712bf2abd198972e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11627 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: flokli <flokli@flokli.de>
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ depot, pkgs, ... }:
|
|
|
|
rec {
|
|
qmk_firmware_src = pkgs.fetchFromGitHub {
|
|
owner = "Keychron"; # the Keychron fork of qmk/qmk_firmware
|
|
repo = "qmk_firmware";
|
|
rev = "e0a48783e7cde92d1edfc53a8fff511c45e869d4"; # bluetooth_playground branch
|
|
hash = "sha256-Pk9kXktmej9JyvSt7UMEW2FDrBg7k1lOssh6HjrP5ro=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
firmware = pkgs.stdenv.mkDerivation {
|
|
name = "keychron-k6_pro-firmware";
|
|
|
|
src = qmk_firmware_src;
|
|
|
|
nativeBuildInputs = [
|
|
pkgs.qmk
|
|
];
|
|
|
|
buildPhase = ''
|
|
mkdir -p keyboards/keychron/k6_pro/ansi/rgb/keymaps/flokli
|
|
cp ${./keymap.c} keyboards/keychron/k6_pro/ansi/rgb/keymaps/flokli/keymap.c
|
|
cp ${./rules.mk} keyboards/keychron/k6_pro/ansi/rgb/keymaps/flokli/rules.mk
|
|
|
|
make keychron/k6_pro/ansi/rgb:flokli
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
|
|
cp keychron_k6_pro_ansi_rgb_flokli.bin $out/
|
|
'';
|
|
};
|
|
|
|
flash = pkgs.writeShellScript "flash.sh" ''
|
|
QMK_HOME=${qmk_firmware_src} ${pkgs.qmk}/bin/qmk flash ${firmware}/keychron_k6_pro_ansi_rgb_flokli.bin
|
|
'';
|
|
|
|
meta.ci.targets = [ "firmware" ];
|
|
}
|