2009-12-21 08:49:31 +01:00
|
|
|
{stdenv, fetchurl}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "gentoo-gnatboot-4.1";
|
|
|
|
|
2012-12-28 19:54:15 +01:00
|
|
|
src = if stdenv.system == "i686-linux" then
|
2009-12-21 08:49:31 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2";
|
|
|
|
sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr";
|
|
|
|
}
|
2012-12-28 19:54:15 +01:00
|
|
|
else if stdenv.system == "x86_64-linux" then
|
2009-12-21 08:49:31 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "mirror://gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2";
|
|
|
|
sha256 = "1li4d52lmbnfs6llcshlbqyik2q2q4bvpir0f7n38nagp0h6j0d4";
|
|
|
|
} else throw "Platform not supported";
|
|
|
|
|
|
|
|
dontStrip=1;
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out
|
2009-12-21 08:49:31 +01:00
|
|
|
cp -R * $out
|
|
|
|
set +e
|
2010-01-19 00:28:58 +01:00
|
|
|
for a in $out/bin/* ; do
|
2014-12-17 19:11:30 +01:00
|
|
|
patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
2015-03-04 22:15:10 +01:00
|
|
|
--set-rpath $(cat $NIX_CC/nix-support/orig-libc)/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib64:$(cat $NIX_CC/nix-support/orig-cc)/lib $a
|
2009-12-21 08:49:31 +01:00
|
|
|
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;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
2009-12-21 08:49:31 +01:00
|
|
|
maintainers = [
|
|
|
|
stdenv.lib.maintainers.viric
|
|
|
|
];
|
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|