Fix the SGUI aliases
[jackhill/qmk/firmware.git] / shell.nix
1 { pkgs ? import <nixpkgs> {}
2 , avr ? true, arm ? true, teensy ? true }:
3
4 with pkgs;
5 let
6 avr_incflags = [
7 "-isystem ${avrlibc}/avr/include"
8 "-B${avrlibc}/avr/lib/avr5"
9 "-L${avrlibc}/avr/lib/avr5"
10 "-B${avrlibc}/avr/lib/avr35"
11 "-L${avrlibc}/avr/lib/avr35"
12 "-B${avrlibc}/avr/lib/avr51"
13 "-L${avrlibc}/avr/lib/avr51"
14 ];
15 in
16
17 stdenv.mkDerivation {
18 name = "qmk-firmware";
19
20 buildInputs = [ dfu-programmer dfu-util diffutils git ]
21 ++ lib.optional avr [ avrbinutils avrgcc avrlibc ]
22 ++ lib.optional arm [ gcc-arm-embedded ]
23 ++ lib.optional teensy [ teensy-loader-cli ];
24
25 CFLAGS = lib.optional avr avr_incflags;
26 ASFLAGS = lib.optional avr avr_incflags;
27 }