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 <mail@tazj.in>
This commit is contained in:
Griffin Smith 2020-07-06 18:12:13 -04:00 committed by glittershark
parent aae3d25234
commit 9ec0f4d0c8
4 changed files with 32 additions and 12 deletions

View file

@ -101,5 +101,6 @@ in lib.fix (self: {
glittershark = with depot.users.glittershark; [ glittershark = with depot.users.glittershark; [
(systemFor system.system.chupacabra) (systemFor system.system.chupacabra)
xanthous xanthous
keyboard.layout
]; ];
}) })

View file

@ -36,6 +36,8 @@ let
age age
autoconf autoconf
autoreconfHook autoreconfHook
avrlibc
avrdude
awscli awscli
bashInteractive bashInteractive
bat bat
@ -58,6 +60,9 @@ let
coreutils coreutils
cudatoolkit cudatoolkit
darwin darwin
dfu-programmer
dfu-util
diffutils
dockerTools dockerTools
execline execline
fetchFromGitHub fetchFromGitHub
@ -106,6 +111,7 @@ let
pandoc pandoc
parallel parallel
pkgconfig pkgconfig
pkgsCross
postgresql postgresql
pounce pounce
pulseaudio pulseaudio
@ -128,6 +134,7 @@ let
symlinkJoin symlinkJoin
systemd systemd
tdlib tdlib
teensy-loader-cli
terraform_0_12 terraform_0_12
texlive texlive
thttpd thttpd

View file

@ -1,7 +1,8 @@
{ nixpkgs ? import <nixpkgs> {} { pkgs, ... }:
}:
with nixpkgs; with pkgs;
let avrlibc = pkgsCross.avr.libcCross; in
rec { rec {
qmkSource = fetchgit { qmkSource = fetchgit {
@ -11,18 +12,29 @@ rec {
fetchSubmodules = true; fetchSubmodules = true;
}; };
qmk = import "${qmkSource}/shell.nix" { layout = stdenv.mkDerivation rec {
avr = true;
teensy = true;
arm = false;
};
layout = stdenv.mkDerivation {
name = "ergodox_ez_grfn.hex"; name = "ergodox_ez_grfn.hex";
src = qmkSource; 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 ]; patches = [ ./increase-tapping-delay.patch ];

View file

@ -1,2 +1,2 @@
#!/usr/bin/env bash #!/usr/bin/env bash
exec "$(nix-build --no-out-link . -A flash)" exec "$(nix-build --no-out-link ../../.. -A users.glittershark.keyboard.flash)"