3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/sdcc/default.nix

42 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, zlib, gputils ? null
2018-07-17 17:16:24 +01:00
, excludePorts ? [] }:
with lib;
2018-07-17 17:16:24 +01:00
let
# choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
2018-07-17 17:16:24 +01:00
excludedPorts = excludePorts ++ (optionals (gputils == null) [ "pic14" "pic16" ]);
in
2018-07-17 17:16:24 +01:00
stdenv.mkDerivation rec {
pname = "sdcc";
2021-04-17 13:00:52 +01:00
version = "4.1.0";
src = fetchurl {
url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
2021-04-17 13:00:52 +01:00
sha256 = "0gskzli17ghnn5qllvn4d56qf9bvvclqjh63nnj63p52smvggvc1";
};
buildInputs = [ boost gputils texinfo zlib ];
nativeBuildInputs = [ autoconf bison flex ];
2018-07-17 17:16:24 +01:00
configureFlags = map (f: "--disable-${f}-port") excludedPorts;
2018-07-17 17:16:24 +01:00
meta = {
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/";
license = with licenses; if (gputils == null) then gpl2Plus else unfreeRedistributable;
2018-07-17 17:16:24 +01:00
maintainers = with maintainers; [ bjornfor yorickvp ];
2019-09-01 18:47:05 +01:00
platforms = platforms.all;
};
}