Merge pull request #43673 from yorickvP/master

sdcc, gputils: add gputils
This commit is contained in:
Yegor Timoshenko 2018-07-17 19:42:10 +03:00 committed by GitHub
commit ffaf902ee3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 11 deletions

View file

@ -1,22 +1,27 @@
{ stdenv, fetchurl, bison, flex, boost, texinfo, gputils ? null }:
{ stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, gputils ? null
, excludePorts ? [] }:
with stdenv.lib;
let
# choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
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";
};
# TODO: remove this comment when gputils != null is tested
buildInputs = [ bison flex boost texinfo gputils ];
buildInputs = [ autoconf bison boost flex gputils texinfo ];
configureFlags = ''
${if gputils == null then "--disable-pic14-port --disable-pic16-port" else ""}
'';
configureFlags = map (f: "--disable-${f}-port") excludedPorts;
meta = with stdenv.lib; {
meta = {
description = "Small Device C Compiler";
longDescription = ''
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
@ -27,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 gpl2 else unfreeRedistributable;
maintainers = with maintainers; [ bjornfor yorickvp ];
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}

View file

@ -0,0 +1,18 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "gputils-${version}";
version = "1.5.0-1";
src = fetchurl {
url = "mirror://sourceforge/gputils/${name}.tar.bz2";
sha256 = "055v83fdgqljprapf7rmh8x66mr13fj0qypj49xba5spx0ca123g";
};
meta = with stdenv.lib; {
homepage = https://gputils.sourceforge.io/;
license = licenses.gpl2;
maintainers = with maintainers; [ yorickvp ];
platforms = platforms.linux;
};
}

View file

@ -7074,7 +7074,9 @@ with pkgs;
scalafmt = callPackage ../development/tools/scalafmt { };
sdcc = callPackage ../development/compilers/sdcc { };
sdcc = callPackage ../development/compilers/sdcc {
gputils = null;
};
serpent = callPackage ../development/compilers/serpent { };
@ -8163,6 +8165,8 @@ with pkgs;
gotty = callPackage ../servers/gotty { };
gputils = callPackage ../development/tools/misc/gputils { };
gradleGen = callPackage ../development/tools/build-managers/gradle { };
gradle = self.gradleGen.gradle_latest;
gradle_2_14 = self.gradleGen.gradle_2_14;