summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthin Probst <harlydavidsen@gmail.com>2022-07-14 07:14:58 -0500
committerGitHub <noreply@github.com>2022-07-14 14:14:58 +0200
commit6e6436963d558d89c5fb902f4b7a831323ecb9dc (patch)
tree0ede09b0a047a14e7e85c3d92f3bb6480df08d76
parent19cb612405c82c7f4fb3ce4497e24c1efa0b1935 (diff)
gnatboot: 4.1 -> 11.2.0-4 (#177579)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
-rw-r--r--pkgs/development/compilers/gnatboot/default.nix70
-rw-r--r--pkgs/top-level/all-packages.nix10
2 files changed, 38 insertions, 42 deletions
diff --git a/pkgs/development/compilers/gnatboot/default.nix b/pkgs/development/compilers/gnatboot/default.nix
index a23398d2e19d..b7fb8463d9cb 100644
--- a/pkgs/development/compilers/gnatboot/default.nix
+++ b/pkgs/development/compilers/gnatboot/default.nix
@@ -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 = 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";
+ 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=";
+ };
- 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" ];
};
}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 62fe8ba56ae4..cfdd46db844e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -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;
});