about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorYegor Timoshenko <yegortimoshenko@riseup.net>2018-07-17 19:16:24 +0300
committerGitHub <noreply@github.com>2018-07-17 19:16:24 +0300
commit4bd4c876f2607322cee7716a7a67c3e2e2e294c4 (patch)
tree42ec32352d2bc95cf727af98a55fdd7e2b6395e7 /pkgs/development
parent072febaa922635bd048d683ef51c408c1873f348 (diff)
downloadnixlib-4bd4c876f2607322cee7716a7a67c3e2e2e294c4.tar
nixlib-4bd4c876f2607322cee7716a7a67c3e2e2e294c4.tar.gz
nixlib-4bd4c876f2607322cee7716a7a67c3e2e2e294c4.tar.bz2
nixlib-4bd4c876f2607322cee7716a7a67c3e2e2e294c4.tar.lz
nixlib-4bd4c876f2607322cee7716a7a67c3e2e2e294c4.tar.xz
nixlib-4bd4c876f2607322cee7716a7a67c3e2e2e294c4.tar.zst
nixlib-4bd4c876f2607322cee7716a7a67c3e2e2e294c4.zip
sdcc: clean up
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/sdcc/default.nix24
1 files changed, 13 insertions, 11 deletions
diff --git a/pkgs/development/compilers/sdcc/default.nix b/pkgs/development/compilers/sdcc/default.nix
index f2b6e3af439f..0e9a348dd508 100644
--- a/pkgs/development/compilers/sdcc/default.nix
+++ b/pkgs/development/compilers/sdcc/default.nix
@@ -1,25 +1,27 @@
-{ stdenv, fetchurl, bison, flex, boost, texinfo, autoconf, gputils ? null, disabled ? [] }:
+{ stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, gputils ? null
+, excludePorts ? [] }:
+
+with stdenv.lib;
+
 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;
+  excludedPorts = excludePorts ++ (optionals (gputils == null) [ "pic14" "pic16" ]);
 in
+
 stdenv.mkDerivation rec {
-  version = "3.7.0";
   name = "sdcc-${version}";
+  version = "3.7.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
     sha256 = "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5";
   };
 
-  buildInputs = [ bison flex boost texinfo gputils autoconf ];
+  buildInputs = [ autoconf bison boost flex gputils texinfo ];
 
-  configureFlags = ''
-    ${lib.concatMapStringsSep " " (f: "--disable-${f}-port") allDisabled}
-  '';
+  configureFlags = map (f: "--disable-${f}-port") excludedPorts;
 
-  meta = with lib; {
+  meta = {
     description = "Small Device C Compiler";
     longDescription = ''
       SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
@@ -30,8 +32,8 @@ stdenv.mkDerivation rec {
       PIC18 targets. It can be retargeted for other microprocessors.
     '';
     homepage = http://sdcc.sourceforge.net/;
-    license = licenses.gpl2;
+    license = with licenses; if (gputils == null) then unfreeRedistributable else gpl2;
+    maintainers = with maintainers; [ bjornfor yorickvp ];
     platforms = platforms.linux;
-    maintainers = [ maintainers.bjornfor maintainers.yorickvp ];
   };
 }