1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00

treewide: use gnu toolchain for avr/arm-embedded

These packages should in theory work with our GCC toolchains, but
there are some definite breakages that need to be tracked down.
Comparing output of these to old gcc-arm-embedded is important.

Affected packages include:

- axolooti
- avrdudess
- opentx
- microscheme
- betaflight
- inav
- blackmagic
- simavr
- gnuk
This commit is contained in:
Matthew Bauer 2018-10-12 15:21:26 -05:00
parent 501d072b5f
commit aa4707fc34
11 changed files with 57 additions and 42 deletions

View file

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, fetchurl, makeWrapper, unzip
, gnumake, gcc-arm-embedded, dfu-util-axoloti, jdk, ant, libfaketime }:
, gnumake, gcc-arm-embedded, binutils-arm-embedded
, dfu-util-axoloti, jdk, ant, libfaketime }:
stdenv.mkDerivation rec {
version = "1.0.12-2";
@ -20,7 +21,7 @@ stdenv.mkDerivation rec {
sha256 = "0lb5s8pkj80mqhsy47mmq0lqk34s2a2m3xagzihalvabwd0frhlj";
};
buildInputs = [ makeWrapper unzip gcc-arm-embedded dfu-util-axoloti jdk ant libfaketime ];
buildInputs = [ makeWrapper unzip gcc-arm-embedded binutils-arm-embedded dfu-util-axoloti jdk ant libfaketime ];
patchPhase = ''
unzip ${chibios}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip, mono, avrbinutils, avrgcc, avrdude, gtk2, xdg_utils }:
{ stdenv, fetchurl, unzip, mono, avrdude, gtk2, xdg_utils }:
stdenv.mkDerivation rec {
name = "avrdudess-2.2.20140102";
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [gtk2 mono]}"
# We need PATH from user env for xdg-open to find its tools, which
# typically depend on the currently running desktop environment.
export PATH="${stdenv.lib.makeBinPath [ avrgcc avrbinutils avrdude xdg_utils ]}:\$PATH"
export PATH="${stdenv.lib.makeBinPath [ avrdude xdg_utils ]}:\$PATH"
# avrdudess must have its resource files in its current working directory
cd $out/avrdudess && exec ${mono}/bin/mono "$out/avrdudess/avrdudess.exe" "\$@"

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub
, cmake, gcc-arm-embedded, python
, cmake, gcc-arm-embedded, binutils-arm-embedded, python
, qt5, SDL, gmock
, dfu-util, avrdude
}:
@ -21,10 +21,12 @@ in stdenv.mkDerivation {
enableParallelBuilding = true;
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
gcc-arm-embedded binutils-arm-embedded
];
buildInputs = with qt5; [
gcc-arm-embedded
python python.pkgs.pyqt4
qtbase qtmultimedia qttranslations
SDL gmock

View file

@ -1,4 +1,4 @@
{ stdenv, fetchzip, vim, avrdude, avrbinutils, avrgcc, avrlibc, makeWrapper }:
{ stdenv, fetchzip, vim, makeWrapper }:
stdenv.mkDerivation rec {
name = "microscheme-${version}";
@ -10,15 +10,10 @@ stdenv.mkDerivation rec {
sha256 = "1r3ng4pw1s9yy1h5rafra1rq19d3vmb5pzbpcz1913wz22qdd976";
};
# Just a guess
propagatedBuildInputs = [ avrlibc ];
buildInputs = [ makeWrapper vim ];
installPhase = ''
make install PREFIX=$out
wrapProgram $out/bin/microscheme \
--prefix PATH : "${stdenv.lib.makeBinPath [ avrdude avrgcc avrbinutils ]}"
'';
meta = with stdenv.lib; {

View file

@ -23,12 +23,13 @@ in stdenv.mkDerivation {
"--disable-nls"
"--enable-newlib-io-long-long"
"--enable-newlib-register-fini"
"--enable-newlib-retargetable-locking"
];
dontDisableStatic = true;
passthru = {
incdir = "/${stdenv.hostPlatform.config}/include";
libdir = "/${stdenv.hostPlatform.config}/lib";
incdir = "/${stdenv.targetPlatform.config}/include";
libdir = "/${stdenv.targetPlatform.config}/lib";
};
}

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub
, gcc-arm-embedded, python2
, gcc-arm-embedded, binutils-arm-embedded, python2
, skipTargets ? [
# These targets do not build, for the reasons listed, along with the last version checked.
# Probably all of the issues with these targets need to be addressed upstream.
@ -24,8 +24,8 @@ in stdenv.mkDerivation rec {
sha256 = "1wyp23p876xbfi9z6gm4xn1nwss3myvrjjjq9pd3s0vf5gkclkg5";
};
buildInputs = [
gcc-arm-embedded
nativeBuildInputs = [
gcc-arm-embedded binutils-arm-embedded
python2
];
@ -58,7 +58,6 @@ in stdenv.mkDerivation rec {
homepage = https://github.com/betaflight/betaflight;
license = licenses.gpl3;
maintainers = with maintainers; [ elitak ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub
, gcc-arm-embedded, ruby
, gcc-arm-embedded, binutils-arm-embedded, ruby
}:
let
@ -17,8 +17,8 @@ in stdenv.mkDerivation rec {
sha256 = "15zai8qf43b06fmws1sbkmdgip51zp7gkfj7pp9b6gi8giarzq3y";
};
buildInputs = [
gcc-arm-embedded
nativeBuildInputs = [
gcc-arm-embedded binutils-arm-embedded
ruby
];
@ -50,7 +50,6 @@ in stdenv.mkDerivation rec {
homepage = https://inavflight.github.io;
license = licenses.gpl3;
maintainers = with maintainers; [ elitak ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub
, gcc-arm-embedded, libftdi
, gcc-arm-embedded, binutils-arm-embedded, libftdi
, python, pythonPackages
}:
@ -17,8 +17,11 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
nativeBuildInputs = [
gcc-arm-embedded binutils-arm-embedded
];
buildInputs = [
gcc-arm-embedded
libftdi
python
pythonPackages.intelhex

View file

@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, avrbinutils, avrgcc, avrlibc, libelf, which, git, pkgconfig, freeglut
{ stdenv, fetchFromGitHub, libelf, which, git, pkgconfig, freeglut
, avrbinutils, avrgcc, avrlibc
, libGLU_combined }:
stdenv.mkDerivation rec {
@ -15,14 +16,10 @@ stdenv.mkDerivation rec {
# ld: cannot find -lsimavr
enableParallelBuilding = false;
preConfigure = ''
substituteInPlace Makefile.common --replace "-I../simavr/sim/avr -I../../simavr/sim/avr" \
"-I${avrlibc}/avr/include -L${avrlibc}/avr/lib/avr5 -B${avrlibc}/avr/lib -I../simavr/sim/avr -I../../simavr/sim/avr"
'';
buildFlags = "AVR_ROOT=${avrlibc}/avr SIMAVR_VERSION=${version}";
installFlags = buildFlags + " DESTDIR=$(out)";
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
@ -31,8 +28,8 @@ stdenv.mkDerivation rec {
patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ which git avrbinutils avrgcc avrlibc libelf freeglut libGLU_combined ];
nativeBuildInputs = [ which git pkgconfig avrgcc avrbinutils ];
buildInputs = [ libelf freeglut libGLU_combined ];
meta = with stdenv.lib; {
description = "A lean and mean Atmel AVR simulator";
@ -43,4 +40,3 @@ stdenv.mkDerivation rec {
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, gcc-arm-embedded, makeWrapper
{ stdenv, gcc-arm-embedded, binutils-arm-embedded, makeWrapper
, python, pythonPackages
# Extra options
@ -14,7 +14,7 @@ stdenv.mkDerivation {
inherit src;
nativeBuildInputs = [ gcc-arm-embedded makeWrapper ];
nativeBuildInputs = [ gcc-arm-embedded binutils-arm-embedded makeWrapper ];
buildInputs = [ python ] ++ (with pythonPackages; [ pyusb colorama ]);
configurePhase = ''

View file

@ -830,7 +830,10 @@ with pkgs;
libssl = openssl;
};
axoloti = callPackage ../applications/audio/axoloti { };
axoloti = callPackage ../applications/audio/axoloti {
gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc;
binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils;
};
dfu-util-axoloti = callPackage ../applications/audio/axoloti/dfu-util.nix { };
libusb1-axoloti = callPackage ../applications/audio/axoloti/libusb1.nix {
inherit (darwin) libobjc;
@ -7998,7 +8001,10 @@ with pkgs;
avr8burnomat = callPackage ../development/misc/avr8-burn-omat { };
betaflight = callPackage ../development/misc/stm32/betaflight { };
betaflight = callPackage ../development/misc/stm32/betaflight {
gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc;
binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils;
};
sourceFromHead = callPackage ../build-support/source-from-head-fun.nix {};
@ -8034,7 +8040,10 @@ with pkgs;
guile = guile_2_0;
};
inav = callPackage ../development/misc/stm32/inav { };
inav = callPackage ../development/misc/stm32/inav {
gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc;
binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils;
};
pharo-vms = callPackage ../development/pharo/vm { };
pharo = pharo-vms.multi-vm-wrapper;
@ -8192,6 +8201,8 @@ with pkgs;
blackmagic = callPackage ../development/tools/misc/blackmagic {
stdenv = overrideCC stdenv gcc6;
gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc;
binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils;
};
bloaty = callPackage ../development/tools/bloaty { };
@ -12206,7 +12217,11 @@ with pkgs;
graphite2 = callPackage ../development/libraries/silgraphite/graphite2.nix {};
simavr = callPackage ../development/tools/simavr { };
simavr = callPackage ../development/tools/simavr {
avrgcc = pkgsCross.avr.buildPackages.gcc;
avrbinutils = pkgsCross.avr.buildPackages.binutils;
avrlibc = pkgsCross.avr.libcCross;
};
simgear = callPackage ../development/libraries/simgear { };
@ -18301,7 +18316,10 @@ with pkgs;
opentimestamps-client = python3Packages.callPackage ../tools/misc/opentimestamps-client {};
opentx = callPackage ../applications/misc/opentx { };
opentx = callPackage ../applications/misc/opentx {
gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc;
binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils;
};
opera = callPackage ../applications/networking/browsers/opera {};
@ -21982,7 +22000,8 @@ with pkgs;
gnome-breeze = callPackage ../misc/themes/gnome-breeze { };
gnuk = callPackage ../misc/gnuk {
gcc-arm-embedded = gcc-arm-embedded-4_9;
gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc;
binutils-arm-embedded = pkgsCross.arm-embedded.buildPackages.binutils;
};
greybird = callPackage ../misc/themes/greybird { };