1{ stdenv, fetchurl, bison, flex, boost, texinfo, gputils ? null }:
2
3stdenv.mkDerivation rec {
4 version = "3.7.0";
5 name = "sdcc-${version}";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
9 sha256 = "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5";
10 };
11
12 # TODO: remove this comment when gputils != null is tested
13 buildInputs = [ bison flex boost texinfo gputils ];
14
15 configureFlags = ''
16 ${if gputils == null then "--disable-pic14-port --disable-pic16-port" else ""}
17 '';
18
19 meta = with stdenv.lib; {
20 description = "Small Device C Compiler";
21 longDescription = ''
22 SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
23 the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim
24 (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based
25 (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000,
26 Rabbit 3000A). Work is in progress on supporting the Microchip PIC16 and
27 PIC18 targets. It can be retargeted for other microprocessors.
28 '';
29 homepage = http://sdcc.sourceforge.net/;
30 license = licenses.gpl2;
31 platforms = platforms.linux;
32 maintainers = [ maintainers.bjornfor ];
33 };
34}