15 assert lib.subtractLists [
16 "ds390" "ds400" "gbz80" "hc08" "mcs51" "pic14" "pic16" "r2k" "r3ka" "s08"
17 "stm8" "tlcs90" "z80" "z180"
19 stdenv.mkDerivation (finalAttrs: {
24 url = "mirror://sourceforge/sdcc/sdcc-src-${finalAttrs.version}.tar.bz2";
25 hash = "sha256-tJuuHSO81gV6gsT/5WE/nNDLz9HpQOnYTEv+nfCowFM=";
28 outputs = [ "out" "doc" "man" ];
30 enableParallelBuilding = true;
42 ] ++ lib.optionals withGputils [
47 excludedPorts = excludePorts
48 ++ (lib.optionals (!withGputils) [ "pic14" "pic16" ]);
50 map (f: "--disable-${f}-port") excludedPorts;
53 if test -n "''${dontStrip-}"; then
59 homepage = "https://sdcc.sourceforge.net/";
60 description = "Small Device C Compiler";
62 SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
63 the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.),
64 Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola)
65 HC08 based (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit
66 2000/3000, Rabbit 3000A). Work is in progress on supporting the Microchip
67 PIC16 and PIC18 targets. It can be retargeted for other microprocessors.
69 license = if withGputils
70 then lib.licenses.unfreeRedistributable
71 else lib.licenses.gpl2Plus;
73 maintainers = with lib.maintainers; [ bjornfor yorickvp ];
74 platforms = lib.platforms.all;