From d0ef8a845ef4102562e87968519899a85a083b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 31 Oct 2008 16:52:44 +0000 Subject: [PATCH] Add TinyCC (TCC), a small, fast, and embeddable C compiler and interpreter. svn path=/nixpkgs/trunk/; revision=13168 --- pkgs/development/compilers/tinycc/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/compilers/tinycc/default.nix diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix new file mode 100644 index 00000000000..e4e50f7dbfe --- /dev/null +++ b/pkgs/development/compilers/tinycc/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, perl, texinfo }: + +let version = "0.9.24"; in + stdenv.mkDerivation { + name = "tinycc-${version}"; + + src = fetchurl { + url = "mirror://savannah/tinycc/tcc-${version}.tar.bz2"; + sha256 = "0yafz627ky0lhppa6g1mfmisnis745m39l15aixmmv5n383x9bi7"; + }; + + buildInputs = [ perl texinfo ]; + + patchPhase = '' + substituteInPlace "texi2pod.pl" \ + --replace "/usr/bin/perl" "${perl}/bin/perl" + ''; + + postInstall = '' + makeinfo --force tcc-doc.texi || true + + ensureDir "$out/share/info" + mv tcc-doc.info* "$out/share/info" + ''; + + meta = { + description = "TinyCC, a small, fast, and embeddable C compiler and interpreter"; + homepage = http://www.tinycc.org/; + license = "LGPLv2+"; + }; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9495961d69..a3ebd64ccac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1889,6 +1889,10 @@ let inherit fetchurl stdenv; }; + tinycc = import ../development/compilers/tinycc { + inherit fetchurl stdenv perl texinfo; + }; + transformers = import ../development/compilers/transformers { inherit fetchurl pkgconfig sdf stlport; aterm = aterm23;