.vscode
docs
drivers
keyboards
layouts
lib
quantum
tests
tmk_core
users
util
.clang_complete
.editorconfig
.gitattributes
.gitignore
.gitmodules
.travis.yml
CODE_OF_CONDUCT.md
Dockerfile
Doxyfile
LICENSE
Makefile
Vagrantfile
autocomplete.sh
book.json
bootloader.mk
build_full_test.mk
build_keyboard.mk
build_layout.mk
build_test.mk
common.mk
common_features.mk
doxygen-todo
license_GPLv2.md
license_GPLv3.md
license_Modified_BSD.md
message.mk
readme.md
secrets.tar.enc
shell.nix
testlist.mk
* Pin avr-gcc in shell.nix pending release of 8.3.0 There's apparently a critical bug in 8.2.0, which is now the nixpkgs default. This change overrides that default in favor of the known good version. Once 8.3.0 is the default, the override can be dropped. * Arch/Manjaro fix
36 lines
1.0 KiB
Nix
36 lines
1.0 KiB
Nix
# dfu-programmer doesn't have darwin on it's list of supported platforms
|
|
{ pkgs ? import <nixpkgs> { config = { allowUnsupportedSystem = true; }; }
|
|
, avr ? true, arm ? true, teensy ? true }:
|
|
|
|
with pkgs;
|
|
let
|
|
avr_incflags = [
|
|
"-isystem ${avrlibc}/avr/include"
|
|
"-B${avrlibc}/avr/lib/avr5"
|
|
"-L${avrlibc}/avr/lib/avr5"
|
|
"-B${avrlibc}/avr/lib/avr35"
|
|
"-L${avrlibc}/avr/lib/avr35"
|
|
"-B${avrlibc}/avr/lib/avr51"
|
|
"-L${avrlibc}/avr/lib/avr51"
|
|
];
|
|
avrgcc = pkgs.avrgcc.overrideAttrs (oldAttrs: rec {
|
|
name = "avr-gcc-8.1.0";
|
|
src = fetchurl {
|
|
url = "mirror://gcc/releases/gcc-8.1.0/gcc-8.1.0.tar.xz";
|
|
sha256 = "0lxil8x0jjx7zbf90cy1rli650akaa6hpk8wk8s62vk2jbwnc60x";
|
|
};
|
|
});
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
name = "qmk-firmware";
|
|
|
|
buildInputs = [ dfu-programmer dfu-util diffutils git ]
|
|
++ lib.optional avr [ avrbinutils avrgcc avrlibc avrdude ]
|
|
++ lib.optional arm [ gcc-arm-embedded ]
|
|
++ lib.optional teensy [ teensy-loader-cli ];
|
|
|
|
CFLAGS = lib.optional avr avr_incflags;
|
|
ASFLAGS = lib.optional avr avr_incflags;
|
|
}
|