nixpkgs/pkgs/development/compilers/gnatboot/default.nix
Lluís Batlle i Rossell fb82bac2fc Adding first built version of the gnat compiler for gcc 4.4.
Some things don't work:
- The ghdl expression (it still needs the gcc 4.3.4 src, ...)
- The gnat wrappers need to be more generic - now they work only for the
  given gnatboot (taken from gentoo) and gnats installed to their $out
  store path.
- Using the cloogppl and ppl. We will need our own gnatboot built with c++
  libraries for that.


svn path=/nixpkgs/branches/stdenv-updates/; revision=19060
2009-12-21 07:49:31 +00:00

51 lines
1.3 KiB
Nix

{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "gentoo-gnatboot-4.1";
src = if (stdenv.system == "i686-linux") then
fetchurl {
url = "mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2";
sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr";
}
else if (stdenv.system == "x86_64-linux") then
fetchurl {
url = "mirror://gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2";
sha256 = "1li4d52lmbnfs6llcshlbqyik2q2q4bvpir0f7n38nagp0h6j0d4";
} else throw "Platform not supported";
dontStrip=1;
installPhase = ''
ensureDir $out
cp -R * $out
cd $out/bin
set +e
for a in *; do
patchelf --interpreter $(cat $NIX_GCC/nix-support/dynamic-linker) \
--set-rpath $(cat $NIX_GCC/nix-support/orig-libc)/lib:$(cat
$NIX_GCC/nix-support/orig-gcc) $a
done
set -e
mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
ln -s $out/bin/gnatgcc $out/bin/gcc
'';
passthru = {
langC = true; /* TRICK for gcc-wrapper to wrap it */
langCC = false;
langFortran = false;
langAda = true;
};
meta = {
homepage = http://gentoo.org;
license = "GPLv3+"; # runtime support libraries are typically LGPLv3+
maintainers = [
stdenv.lib.maintainers.viric
];
platforms = stdenv.lib.platforms.linux;
};
}