mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
3b32c920d5
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
39 lines
912 B
Nix
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
|
|
];
|
|
}
|