2019-06-01 23:08:42 +00:00
|
|
|
{ stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, zlib, gputils ? null
|
2018-07-17 16:16:24 +00:00
|
|
|
, excludePorts ? [] }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
2018-07-17 15:28:26 +00:00
|
|
|
let
|
|
|
|
# choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
|
2018-07-17 16:16:24 +00:00
|
|
|
excludedPorts = excludePorts ++ (optionals (gputils == null) [ "pic14" "pic16" ]);
|
2018-07-17 15:28:26 +00:00
|
|
|
in
|
2018-07-17 16:16:24 +00:00
|
|
|
|
sdcc: new nixpkg (SDCC -> Small Device C Compiler)
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.),
Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
HC08 based (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80,
Rabbit 2000/3000, Rabbit 3000A). Work is in progress on supporting the
Microchip PIC16 and PIC18 targets. It can be retargeted for other
microprocessors.
2013-03-10 20:23:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sdcc";
|
2019-06-18 07:40:10 +00:00
|
|
|
version = "3.9.0";
|
sdcc: new nixpkg (SDCC -> Small Device C Compiler)
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.),
Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
HC08 based (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80,
Rabbit 2000/3000, Rabbit 3000A). Work is in progress on supporting the
Microchip PIC16 and PIC18 targets. It can be retargeted for other
microprocessors.
2013-03-10 20:23:56 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
|
2019-06-18 07:40:10 +00:00
|
|
|
sha256 = "0dn0cy6whcrvbfh9x467jdi8dmzjrvixz2bz63pgxwzpz9rsxv4l";
|
sdcc: new nixpkg (SDCC -> Small Device C Compiler)
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.),
Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
HC08 based (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80,
Rabbit 2000/3000, Rabbit 3000A). Work is in progress on supporting the
Microchip PIC16 and PIC18 targets. It can be retargeted for other
microprocessors.
2013-03-10 20:23:56 +00:00
|
|
|
};
|
|
|
|
|
2019-06-01 23:08:42 +00:00
|
|
|
buildInputs = [ autoconf bison boost flex gputils texinfo zlib ];
|
sdcc: new nixpkg (SDCC -> Small Device C Compiler)
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.),
Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
HC08 based (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80,
Rabbit 2000/3000, Rabbit 3000A). Work is in progress on supporting the
Microchip PIC16 and PIC18 targets. It can be retargeted for other
microprocessors.
2013-03-10 20:23:56 +00:00
|
|
|
|
2018-07-17 16:16:24 +00:00
|
|
|
configureFlags = map (f: "--disable-${f}-port") excludedPorts;
|
sdcc: new nixpkg (SDCC -> Small Device C Compiler)
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.),
Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
HC08 based (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80,
Rabbit 2000/3000, Rabbit 3000A). Work is in progress on supporting the
Microchip PIC16 and PIC18 targets. It can be retargeted for other
microprocessors.
2013-03-10 20:23:56 +00:00
|
|
|
|
2018-07-17 16:16:24 +00:00
|
|
|
meta = {
|
sdcc: new nixpkg (SDCC -> Small Device C Compiler)
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.),
Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
HC08 based (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80,
Rabbit 2000/3000, Rabbit 3000A). Work is in progress on supporting the
Microchip PIC16 and PIC18 targets. It can be retargeted for other
microprocessors.
2013-03-10 20:23:56 +00:00
|
|
|
description = "Small Device C Compiler";
|
|
|
|
longDescription = ''
|
|
|
|
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
|
|
|
|
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim
|
|
|
|
(formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based
|
|
|
|
(hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000,
|
|
|
|
Rabbit 3000A). Work is in progress on supporting the Microchip PIC16 and
|
|
|
|
PIC18 targets. It can be retargeted for other microprocessors.
|
|
|
|
'';
|
|
|
|
homepage = http://sdcc.sourceforge.net/;
|
2018-07-17 16:17:03 +00:00
|
|
|
license = with licenses; if (gputils == null) then gpl2 else unfreeRedistributable;
|
2018-07-17 16:16:24 +00:00
|
|
|
maintainers = with maintainers; [ bjornfor yorickvp ];
|
2019-09-01 17:47:05 +00:00
|
|
|
platforms = platforms.all;
|
sdcc: new nixpkg (SDCC -> Small Device C Compiler)
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.),
Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
HC08 based (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80,
Rabbit 2000/3000, Rabbit 3000A). Work is in progress on supporting the
Microchip PIC16 and PIC18 targets. It can be retargeted for other
microprocessors.
2013-03-10 20:23:56 +00:00
|
|
|
};
|
|
|
|
}
|