From 9ec0f4d0c822b63c807ecf869299dc25836b6c03 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 6 Jul 2020 18:12:13 -0400 Subject: feat(gs/keyboard): Integrate my layout with the depot Integrate the keyboard layout for my Ergodox EZ, which is a layout for QMK, with the depot, including exposing several cross-compilation packages necessary to compile qmk for avr in third_party. Change-Id: Idd43169a0a3cf0be2bd1a578fdaff70388a58bfc Reviewed-on: https://cl.tvl.fyi/c/depot/+/947 Tested-by: BuildkiteCI Reviewed-by: tazjin --- users/glittershark/keyboard/default.nix | 34 ++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'users/glittershark/keyboard/default.nix') diff --git a/users/glittershark/keyboard/default.nix b/users/glittershark/keyboard/default.nix index 18169b5be1..7227c1d318 100644 --- a/users/glittershark/keyboard/default.nix +++ b/users/glittershark/keyboard/default.nix @@ -1,7 +1,8 @@ -{ nixpkgs ? import {} -}: +{ pkgs, ... }: -with nixpkgs; +with pkgs; + +let avrlibc = pkgsCross.avr.libcCross; in rec { qmkSource = fetchgit { @@ -11,18 +12,29 @@ rec { fetchSubmodules = true; }; - qmk = import "${qmkSource}/shell.nix" { - avr = true; - teensy = true; - arm = false; - }; - - layout = stdenv.mkDerivation { + layout = stdenv.mkDerivation rec { name = "ergodox_ez_grfn.hex"; src = qmkSource; - inherit (qmk) buildInputs AVR_CFLAGS AVR_ASFLAGS; + buildInputs = [ + dfu-programmer + dfu-util + diffutils + git + python3 + pkgsCross.avr.buildPackages.binutils + pkgsCross.avr.buildPackages.gcc8 + avrlibc + avrdude + ]; + + AVR_CFLAGS = [ + "-isystem ${avrlibc}/avr/include" + "-L${avrlibc}/avr/lib/avr5" + ]; + + AVR_ASFLAGS = AVR_CFLAGS; patches = [ ./increase-tapping-delay.patch ]; -- cgit 1.4.1