gnatboot: 4.1 -> 11.2.0-4 (#177579)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Ethin Probst 2022-07-14 07:14:58 -05:00 committed by GitHub
parent 19cb612405
commit 6e6436963d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 42 deletions

View file

@ -1,41 +1,37 @@
{ lib, stdenv, fetchurl }:
{ stdenv, lib, autoPatchelfHook, fetchzip, xz, ncurses5, readline, gmp, mpfr
, expat, libipt, zlib, dejagnu, sourceHighlight, python3, elfutils, guile, glibc
}:
if stdenv.hostPlatform != stdenv.targetPlatform
then builtins.throw "gnatboot can't cross-compile"
else
stdenv.mkDerivation rec {
pname = "gnatboot";
version = "11.2.0-4";
stdenv.mkDerivation {
pname = "gentoo-gnatboot";
version = "4.1";
src = fetchzip {
url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-${version}/gnat-x86_64-linux-${version}.tar.gz";
hash = "sha256-8fMBJp6igH+Md5jE4LMubDmC4GLt4A+bZG/Xcz2LAJQ=";
};
src = if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2";
sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr";
}
else if stdenv.hostPlatform.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;
nativeBuildInputs = [
autoPatchelfHook
dejagnu
elfutils
expat
glibc
gmp
guile
libipt
mpfr
ncurses5
python3
readline
sourceHighlight
xz
zlib
];
installPhase = ''
mkdir -p $out
cp -R * $out
set +e
for a in $out/bin/* ; do
patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--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
done
set -e
mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
ln -s $out/bin/gnatgcc $out/bin/gcc
cp -ar * $out/
'';
passthru = {
@ -46,10 +42,10 @@ stdenv.mkDerivation {
};
meta = with lib; {
homepage = "https://gentoo.org";
license = licenses.gpl3Plus;
maintainers = [ maintainers.lucus16 ];
platforms = platforms.linux;
description = "GNAT, the GNU Ada Translator";
homepage = "https://www.gnu.org/software/gnat";
license = licenses.gpl3;
maintainers = with maintainers; [ ethindp ];
platforms = with platforms; [ "x86_64-linux" ];
};
}

View file

@ -13196,7 +13196,7 @@ with pkgs;
inherit (gnome2) libart_lgpl;
});
gnat = gnat11;
gnat = gnat12;
gnat6 = wrapCC (gcc6.cc.override {
name = "gnat";
@ -13227,7 +13227,7 @@ with pkgs;
gnatboot =
if stdenv.hostPlatform == stdenv.targetPlatform
&& stdenv.buildPlatform == stdenv.hostPlatform
then buildPackages.gnat6
then buildPackages.gnatboot
else buildPackages.gnat9;
});
@ -13243,7 +13243,7 @@ with pkgs;
gnatboot =
if stdenv.hostPlatform == stdenv.targetPlatform
&& stdenv.buildPlatform == stdenv.hostPlatform
then buildPackages.gnat6
then buildPackages.gnatboot
else buildPackages.gnat10;
});
@ -13259,7 +13259,7 @@ with pkgs;
gnatboot =
if stdenv.hostPlatform == stdenv.targetPlatform
&& stdenv.buildPlatform == stdenv.hostPlatform
then buildPackages.gnat6
then buildPackages.gnatboot
else buildPackages.gnat11;
});
@ -13275,7 +13275,7 @@ with pkgs;
gnatboot =
if stdenv.hostPlatform == stdenv.targetPlatform
&& stdenv.buildPlatform == stdenv.hostPlatform
then buildPackages.gnat6
then buildPackages.gnatboot
else buildPackages.gnat12;
});