betaflight: 3.2.3 -> 3.4.0-rc4

This commit is contained in:
Eric Litak 2018-05-22 10:43:15 -07:00
parent a22ba5f05b
commit 9710439e3d

View File

@ -1,18 +1,17 @@
{ stdenv, fetchFromGitHub { stdenv, fetchFromGitHub
, gcc-arm-embedded, python2 , gcc-arm-embedded, python2
, skipTargets ? [ , skipTargets ? [
# These targets do not build for various unexplored reasons # These targets do not build, for the reasons listed, along with the last version checked.
# TODO ... fix them # Probably all of the issues with these targets need to be addressed upstream.
"AFROMINI" "AG3X" # 3.4.0-rc4: has not specified a valid STM group, must be one of F1, F3, F405, F411 or F7x5. Have you prepared a valid target.mk?
"ALIENWHOOP" "ALIENWHOOP" # 3.4.0-rc4: has not specified a valid STM group, must be one of F1, F3, F405, F411 or F7x5. Have you prepared a valid target.mk?
"BEEBRAIN" "FURYF3" # 3.4.0-rc4: flash region overflow
"CJMCU" "OMNINXT" # 3.4.0-rc4: has not specified a valid STM group, must be one of F1, F3, F405, F411 or F7x5. Have you prepared a valid target.mk?
"FRSKYF3"
]}: ]}:
let let
version = "3.2.3"; version = "3.4.0-rc4";
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
@ -21,8 +20,8 @@ in stdenv.mkDerivation rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "betaflight"; owner = "betaflight";
repo = "betaflight"; repo = "betaflight";
rev = "v${version}"; rev = "8e9e7574481b1abba9354b24f41eb31054943785"; # Always use a commit id here!
sha256 = "0vbjyxfjxgpaiiwvj5bscrlfikzp3wnxpmc4sxcz5yw5mwb9g428"; sha256 = "1wyp23p876xbfi9z6gm4xn1nwss3myvrjjjq9pd3s0vf5gkclkg5";
}; };
buildInputs = [ buildInputs = [
@ -31,7 +30,7 @@ in stdenv.mkDerivation rec {
]; ];
postPatch = '' postPatch = ''
sed -ri "s/REVISION.*=.*git log.*/REVISION = ${builtins.substring 0 9 src.rev}/" Makefile # Let's not require git in shell sed -ri "s/REVISION.*=.*git log.*/REVISION = ${builtins.substring 0 10 src.rev}/" Makefile # Simulate abbrev'd rev.
sed -ri "s/binary hex/hex/" Makefile # No need for anything besides .hex sed -ri "s/binary hex/hex/" Makefile # No need for anything besides .hex
''; '';
@ -39,7 +38,7 @@ in stdenv.mkDerivation rec {
preBuild = '' preBuild = ''
buildFlagsArray=( buildFlagsArray=(
"SKIP_TARGETS=${toString skipTargets}" "NOBUILD_TARGETS=${toString skipTargets}"
"GCC_REQUIRED_VERSION=$(arm-none-eabi-gcc -dumpversion)" "GCC_REQUIRED_VERSION=$(arm-none-eabi-gcc -dumpversion)"
all all
) )
@ -59,7 +58,7 @@ in stdenv.mkDerivation rec {
homepage = https://github.com/betaflight/betaflight; homepage = https://github.com/betaflight/betaflight;
license = licenses.gpl3; license = licenses.gpl3;
maintainers = with maintainers; [ elitak ]; maintainers = with maintainers; [ elitak ];
platforms = platforms.linux; platforms = [ "i686-linux" "x86_64-linux" ];
}; };
} }