1 { lib, stdenv, fetchurl }:
4 pname = "gentoo-gnatboot";
7 src = if stdenv.system == "i686-linux" then
9 url = mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2;
10 sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr";
12 else if stdenv.system == "x86_64-linux" then
14 url = mirror://gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2;
15 sha256 = "1li4d52lmbnfs6llcshlbqyik2q2q4bvpir0f7n38nagp0h6j0d4";
18 throw "Platform not supported";
27 for a in $out/bin/* ; do
28 patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
29 --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
33 mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
34 ln -s $out/bin/gnatgcc $out/bin/gcc
38 langC = true; # TRICK for gcc-wrapper to wrap it
45 homepage = "https://gentoo.org";
46 license = licenses.gpl3Plus;
47 maintainers = [ maintainers.lucus16 ];
49 platforms = platforms.linux;