Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 39 lines 1.5 kB view raw
1{ stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, gputils ? null 2, excludePorts ? [] }: 3 4with stdenv.lib; 5 6let 7 # choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8 8 excludedPorts = excludePorts ++ (optionals (gputils == null) [ "pic14" "pic16" ]); 9in 10 11stdenv.mkDerivation rec { 12 name = "sdcc-${version}"; 13 version = "3.7.0"; 14 15 src = fetchurl { 16 url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2"; 17 sha256 = "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5"; 18 }; 19 20 buildInputs = [ autoconf bison boost flex gputils texinfo ]; 21 22 configureFlags = map (f: "--disable-${f}-port") excludedPorts; 23 24 meta = { 25 description = "Small Device C Compiler"; 26 longDescription = '' 27 SDCC is a retargettable, optimizing ANSI - C compiler suite that targets 28 the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim 29 (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based 30 (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000, 31 Rabbit 3000A). Work is in progress on supporting the Microchip PIC16 and 32 PIC18 targets. It can be retargeted for other microprocessors. 33 ''; 34 homepage = http://sdcc.sourceforge.net/; 35 license = with licenses; if (gputils == null) then gpl2 else unfreeRedistributable; 36 maintainers = with maintainers; [ bjornfor yorickvp ]; 37 platforms = platforms.linux; 38 }; 39}