tvl-depot/users/flokli/keyboards/dilemma/default.nix
Florian Klink 8324913045 chore(users/flokli/kb/dilemma): bump qmk to latest releasewt
Change-Id: Ia0b4784384b0f1dda0f849f14e5619274dec1dd3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11631
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-05-12 11:36:59 +00:00

47 lines
1.1 KiB
Nix

{ depot, pkgs, ... }:
rec {
qmk_firmware_src = pkgs.fetchFromGitHub {
owner = "qmk";
repo = "qmk_firmware";
rev = "0.24.8";
hash = "sha256-DRHPfJXF1KF1+EwkbeGhqhVrpfp21JY2spOZxesZFbA=";
fetchSubmodules = true;
};
firmware = pkgs.stdenv.mkDerivation {
name = "keychron-bastardkb-dilemma-firmware";
src = qmk_firmware_src;
patches = [ ./enable-taps.patch ];
postPatch = ''
patchShebangs util/uf2conv.py
'';
nativeBuildInputs = [
pkgs.python3
pkgs.qmk
];
buildPhase = ''
mkdir -p keyboards/bastardkb/dilemma/3x5_3/keymaps/flokli
cp ${./keymap.c} keyboards/bastardkb/dilemma/3x5_3/keymaps/flokli/keymap.c
cp ${./rules.mk} keyboards/bastardkb/dilemma/3x5_3/keymaps/flokli/rules.mk
make bastardkb/dilemma/3x5_3:flokli
'';
installPhase = ''
mkdir -p $out
cp bastardkb_dilemma_3x5_3_flokli.uf2 $out/
'';
};
flash = pkgs.writeShellScript "flash.sh" ''
QMK_HOME=${qmk_firmware_src} ${pkgs.qmk}/bin/qmk flash ${firmware}/bastardkb_dilemma_3x5_3_flokli.uf2
'';
meta.ci.targets = [ "firmware" ];
}