1{ stdenv, fetchurl, avrgcc, avrbinutils, automake, autoconf }:
2
3let
4 version = "2.0.0";
5in
6stdenv.mkDerivation {
7 name = "avr-libc-${version}";
8
9 src = fetchurl {
10 url = http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2;
11 sha256 = "15svr2fx8j6prql2il2fc0ppwlv50rpmyckaxx38d3gxxv97zpdj";
12 };
13
14 buildInputs = [ avrgcc avrbinutils automake autoconf ];
15 configurePhase = ''
16 unset LD
17 unset AS
18 unset AR
19 unset CC
20 unset CXX
21 unset RANLIB
22 unset STRIP
23
24 ./configure --prefix=$out --build=$(./config.guess) --host=avr
25 '';
26
27 # Make sure we don't strip the libraries in lib/gcc/avr.
28 stripDebugList= "bin";
29 dontPatchELF = true;
30
31 meta = with stdenv.lib; {
32 description = "a C runtime library for AVR microcontrollers";
33 homepage = http://savannah.nongnu.org/projects/avr-libc/;
34 license = licenses.bsd3;
35 platforms = platforms.unix;
36 maintainers = with maintainers; [ mguentner ];
37 };
38}