diff options
author | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2018-07-17 17:28:26 +0200 |
---|---|---|
committer | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2018-07-17 17:28:26 +0200 |
commit | f969e426c05e53c805140bd9a6f043a7e0de0771 (patch) | |
tree | f3c7847dde5cffe26de7544f88eca9acded3cff0 /pkgs/development/compilers/sdcc/default.nix | |
parent | 9ba3b39e44705bc5f0638acb30a4c3077a96f7d9 (diff) | |
download | nixlib-f969e426c05e53c805140bd9a6f043a7e0de0771.tar nixlib-f969e426c05e53c805140bd9a6f043a7e0de0771.tar.gz nixlib-f969e426c05e53c805140bd9a6f043a7e0de0771.tar.bz2 nixlib-f969e426c05e53c805140bd9a6f043a7e0de0771.tar.lz nixlib-f969e426c05e53c805140bd9a6f043a7e0de0771.tar.xz nixlib-f969e426c05e53c805140bd9a6f043a7e0de0771.tar.zst nixlib-f969e426c05e53c805140bd9a6f043a7e0de0771.zip |
sdcc: update for added gputils, add disabled flag, adopt
Diffstat (limited to 'pkgs/development/compilers/sdcc/default.nix')
-rw-r--r-- | pkgs/development/compilers/sdcc/default.nix | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/pkgs/development/compilers/sdcc/default.nix b/pkgs/development/compilers/sdcc/default.nix index ec93ba79d44a..f2b6e3af439f 100644 --- a/pkgs/development/compilers/sdcc/default.nix +++ b/pkgs/development/compilers/sdcc/default.nix @@ -1,5 +1,9 @@ -{ stdenv, fetchurl, bison, flex, boost, texinfo, gputils ? null }: - +{ stdenv, fetchurl, bison, flex, boost, texinfo, autoconf, gputils ? null, disabled ? [] }: +let + allDisabled = (if gputils == null then [ "pic14" "pic16" ] else []) ++ disabled; + # choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8 + inherit (stdenv) lib; +in stdenv.mkDerivation rec { version = "3.7.0"; name = "sdcc-${version}"; @@ -9,14 +13,13 @@ stdenv.mkDerivation rec { sha256 = "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5"; }; - # TODO: remove this comment when gputils != null is tested - buildInputs = [ bison flex boost texinfo gputils ]; + buildInputs = [ bison flex boost texinfo gputils autoconf ]; configureFlags = '' - ${if gputils == null then "--disable-pic14-port --disable-pic16-port" else ""} + ${lib.concatMapStringsSep " " (f: "--disable-${f}-port") allDisabled} ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Small Device C Compiler"; longDescription = '' SDCC is a retargettable, optimizing ANSI - C compiler suite that targets @@ -29,6 +32,6 @@ stdenv.mkDerivation rec { homepage = http://sdcc.sourceforge.net/; license = licenses.gpl2; platforms = platforms.linux; - maintainers = [ maintainers.bjornfor ]; + maintainers = [ maintainers.bjornfor maintainers.yorickvp ]; }; } |