3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/misc/qmk_firmware/default.nix
Matthew Bauer 3b32c920d5 systems/parse.nix: support eabihf
eabihf is an abi that can be used with ARM architectures that support
the “hard float”. It should probably only be used with ARM32 when you
are absolutely sure your binaries will run on ARM systems with a FPU.

Also, add an example "armhf-embedded" to match the preexisting
arm-embedded system. qmk_firmware needs hard float in a few places, so
add them here to get that to work.

Fixes #51184
2018-12-02 19:49:36 -06:00

39 lines
912 B
Nix

{ stdenv, fetchFromGitHub
, avrgcc, avrbinutils
, gcc-arm-embedded, gcc-armhf-embedded
, teensy-loader-cli, dfu-programmer, dfu-util }:
let version = "0.6.144";
in stdenv.mkDerivation {
name = "qmk_firmware-${version}";
src = fetchFromGitHub {
owner = "qmk";
repo = "qmk_firmware";
rev = version;
sha256 = "0m71f9w32ksqjkrwhqwhr74q5v3pr38bihjyb9ks0k5id0inhrjn";
fetchSubmodules = true;
};
postPatch = ''
substituteInPlace tmk_core/arm_atsam.mk \
--replace arm-none-eabi arm-none-eabihf
rm keyboards/handwired/frenchdev/rules.mk keyboards/dk60/rules.mk
'';
buildFlags = "all:default";
doCheck = true;
checkTarget = "test:all";
installPhase = ''
mkdir $out
'';
NIX_CFLAGS_COMPILE = "-Wno-error";
nativeBuildInputs = [
avrgcc
avrbinutils
gcc-arm-embedded
gcc-armhf-embedded
teensy-loader-cli
dfu-programmer
dfu-util
];
}