push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
{
stdenv,
lib,
fetchFromGitHub,
gnat,
gprbuild,
gnatcoll-core,
component,
# component dependencies
gmp,
libiconv,
xz,
readline,
zlib,
python3,
ncurses,
}:
let
# omit python (2.7), no need to introduce a
# dependency on an EOL package for no reason
libsFor = {
iconv = [ libiconv ];
gmp = [ gmp ];
lzma = [ xz ];
readline = [ readline ];
python3 = [
python3
ncurses
];
syslog = [ ];
zlib = [ zlib ];
cpp = [ ];
};
in
stdenv.mkDerivation rec {
pname = "gnatcoll-${component}";
version = "25.0.0";
src = fetchFromGitHub {
owner = "AdaCore";
repo = "gnatcoll-bindings";
rev = "v${version}";
sha256 = "0ayc7zvv8w90v0xzhrjk2x88zrsk62xxcm27ya9crlp6affn5idk";
};
nativeBuildInputs = [
gprbuild
gnat
python3
];
# propagate since gprbuild needs to find referenced .gpr files
# and all dependency C libraries when statically linking a
# downstream executable.
propagatedBuildInputs = [
gnatcoll-core
]
++ libsFor."${component}" or [ ];
# explicit flag for GPL acceptance because upstream
# allows a gcc runtime exception for all bindings
# except for readline (since it is GPL w/o exceptions)
buildFlags = lib.optionals (component == "readline") [
"--accept-gpl"
];
buildPhase = ''
runHook preBuild
${python3.interpreter} ${component}/setup.py build --prefix $out $buildFlags
runHook postBuild
'';
installPhase = ''
runHook preInstall
${python3.interpreter} ${component}/setup.py install --prefix $out
runHook postInstall
'';
meta = with lib; {
description = "GNAT Components Collection - Bindings to C libraries";
homepage = "https://github.com/AdaCore/gnatcoll-bindings";
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = [ maintainers.sternenseemann ];
};
}

View File

@@ -0,0 +1,88 @@
{
stdenv,
lib,
gnat,
gprbuild,
fetchFromGitHub,
fetchpatch2,
which,
python3,
rsync,
enableGnatcollCore ? true,
# TODO(@sternenseemann): figure out a way to split this up into three packages
enableGnatcollProjects ? true,
# for tests
gnatcoll-core,
}:
# gnatcoll-projects depends on gnatcoll-core
assert enableGnatcollProjects -> enableGnatcollCore;
stdenv.mkDerivation rec {
pname = "gnatcoll-core";
version = "25.0.0";
src = fetchFromGitHub {
owner = "AdaCore";
repo = "gnatcoll-core";
rev = "v${version}";
sha256 = "1srnh7vhs46c2zy4hcy4pg0a0prghfzlpv7c82k0jan384yz1g6g";
};
patches = [
# Fix compilation with GNAT 12 https://github.com/AdaCore/gnatcoll-core/issues/88
(fetchpatch2 {
name = "gnatcoll-core-gnat-12.patch";
url = "https://github.com/AdaCore/gnatcoll-core/commit/515db1c9f1eea8095f2d9ff9570159a78c981ec6.patch";
sha256 = "1ghnkhp5fncb7qcmf59kyqvy0sd0pzf1phnr2z7b4ljwlkbmcp36";
})
];
postPatch = ''
patchShebangs */*.gpr.py
'';
nativeBuildInputs = [
gprbuild
which
gnat
python3
rsync
];
# propagate since gprbuild needs to find
# referenced GPR project definitions
propagatedBuildInputs = lib.optionals enableGnatcollProjects [
gprbuild # libgpr
];
strictDeps = true;
makeFlags = [
"prefix=${placeholder "out"}"
"PROCESSORS=$(NIX_BUILD_CORES)"
# confusingly, for gprbuild --target is autoconf --host
"TARGET=${stdenv.hostPlatform.config}"
"GNATCOLL_MINIMAL_ONLY=${if !enableGnatcollCore then "yes" else "no"}"
"GNATCOLL_PROJECTS=${if enableGnatcollProjects then "yes" else "no"}"
];
passthru.tests = {
minimalOnly = gnatcoll-core.override {
enableGnatcollProjects = false;
enableGnatcollCore = false;
};
noProjects = gnatcoll-core.override {
enableGnatcollProjects = false;
enableGnatcollCore = true;
};
};
meta = with lib; {
homepage = "https://github.com/AdaCore/gnatcoll-core";
description = "GNAT Components Collection - Core packages";
license = licenses.gpl3Plus;
maintainers = [ maintainers.sternenseemann ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,111 @@
{
stdenv,
lib,
fetchFromGitHub,
gnat,
gprbuild,
which,
gnatcoll-core,
component,
# components built by this derivation other components depend on
gnatcoll-sql,
gnatcoll-sqlite,
gnatcoll-xref,
# component specific extra dependencies
gnatcoll-iconv,
gnatcoll-readline,
sqlite,
libpq,
}:
let
libsFor = {
gnatcoll_db2ada = [
gnatcoll-sql
];
gnatinspect = [
gnatcoll-sqlite
gnatcoll-readline
gnatcoll-xref
];
postgres = [
gnatcoll-sql
libpq
];
sqlite = [
gnatcoll-sql
sqlite
];
xref = [
gnatcoll-iconv
gnatcoll-sqlite
];
};
# These components are just tools and don't install a library
onlyExecutable = builtins.elem component [
"gnatcoll_db2ada"
"gnatinspect"
];
in
stdenv.mkDerivation rec {
# executables don't adhere to the string gnatcoll-* scheme
pname =
if onlyExecutable then
builtins.replaceStrings [ "_" ] [ "-" ] component
else
"gnatcoll-${component}";
version = "25.0.0";
src = fetchFromGitHub {
owner = "AdaCore";
repo = "gnatcoll-db";
rev = "v${version}";
sha256 = "0q35ii0aa4hh59v768l5cilg1b30a4ckcvlbfy0lkcbp3rcfnbz3";
};
# Link executables dynamically unless specified by the platform,
# as we usually do in nixpkgs where possible
postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
for f in gnatcoll_db2ada/Makefile gnatinspect/Makefile; do
substituteInPlace "$f" --replace "=static" "=relocatable"
done
'';
nativeBuildInputs = [
gnat
gprbuild
which
];
# Propagate since GPRbuild needs to find referenced .gpr files
# and other libraries to link against when static linking is used.
# For executables this is of course not relevant and we can reduce
# the closure size dramatically
${if onlyExecutable then "buildInputs" else "propagatedBuildInputs"} = [
gnatcoll-core
]
++ libsFor."${component}" or [ ];
makeFlags = [
"-C"
component
"PROCESSORS=$(NIX_BUILD_CORES)"
# confusingly, for gprbuild --target is autoconf --host
"TARGET=${stdenv.hostPlatform.config}"
"prefix=${placeholder "out"}"
]
++ lib.optionals (component == "sqlite") [
# link against packaged, not vendored libsqlite3
"GNATCOLL_SQLITE=external"
];
meta = with lib; {
description = "GNAT Components Collection - Database packages";
homepage = "https://github.com/AdaCore/gnatcoll-db";
license = licenses.gpl3Plus;
maintainers = [ maintainers.sternenseemann ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,33 @@
From 7458110cc50d91cb7833b2abd232faca52865566 Mon Sep 17 00:00:00 2001
From: Thomas Heijligen <src@posteo.de>
Date: Tue, 21 May 2024 22:02:09 +0000
Subject: [PATCH] fix install
---
Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 4950b2d5cc..9d9358ad08 100644
--- a/Makefile
+++ b/Makefile
@@ -106,11 +106,11 @@ install:
$(CP) share/spark/theories/*why $(THEORIESDIR)
$(CP) share/spark/theories/*mlw $(THEORIESDIR)
$(CP) share/spark/runtimes/README $(RUNTIMESDIR)
- @echo "Generate Coq files by preprocessing context files:"
- $(MAKE) -C include generate
- $(CP) include/src/*.ad? $(INCLUDEDIR)
- $(CP) include/*.gpr $(LIBDIR)
- $(CP) include/proof $(LIBDIR)
+ #@echo "Generate Coq files by preprocessing context files:"
+ #$(MAKE) -C include generate
+ #$(CP) include/src/*.ad? $(INCLUDEDIR)
+ #$(CP) include/*.gpr $(LIBDIR)
+ #$(CP) include/proof $(LIBDIR)
doc: $(DOC)
--
2.44.0

View File

@@ -0,0 +1,22 @@
--- a/src/counterexamples/ce_parsing.adb 2025-03-14 21:48:15.657409808 +0100
+++ b/src/counterexamples/ce_parsing.adb 2025-03-14 22:04:32.114664704 +0100
@@ -975,6 +975,9 @@
elsif Is_Extended_Precision_Floating_Point_Type (Ty) then
pragma Assert (Size (Exp) = 15);
pragma Assert (Size (Significand) = 63);
+ pragma Warnings (Off, "assertion will fail at run time");
+ pragma Warnings (Off,
+ "types for unchecked conversion have different sizes");
declare
package P is new Parse_Conversion
(Interfaces.Unsigned_128, Long_Long_Float);
@@ -983,6 +986,9 @@
begin
return (Float_K, (Extended_K, F));
end;
+ pragma Warnings (On,
+ "types for unchecked conversion have different sizes");
+ pragma Warnings (On, "assertion will fail at run time");
else
raise Program_Error;
end if;

View File

@@ -0,0 +1,33 @@
From 3c06fb993ae628b5069c1f3e23f11c53815e1cbe Mon Sep 17 00:00:00 2001
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Sat, 8 Mar 2025 00:09:57 +0100
Subject: [PATCH] Adjust after category change for N_Formal_Package_Declaration
Issue: eng/toolchain/gnat#1354
---
src/why/gnat2why-borrow_checker.adb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/why/gnat2why-borrow_checker.adb b/src/why/gnat2why-borrow_checker.adb
index a97f225b06..f3ab8be3e9 100644
--- a/src/why/gnat2why-borrow_checker.adb
+++ b/src/why/gnat2why-borrow_checker.adb
@@ -1693,6 +1693,7 @@ procedure Check_Declaration (Decl : Node_Id) is
-- Ignored constructs for pointer checking
when N_Formal_Object_Declaration
+ | N_Formal_Package_Declaration
| N_Formal_Type_Declaration
| N_Incomplete_Type_Declaration
| N_Private_Extension_Declaration
@@ -3326,7 +3327,6 @@ procedure Check_Node (N : Node_Id) is
| N_Empty
| N_Enumeration_Representation_Clause
| N_Exception_Renaming_Declaration
- | N_Formal_Package_Declaration
| N_Formal_Subprogram_Declaration
| N_Freeze_Entity
| N_Freeze_Generic_Entity
--
2.48.1

View File

@@ -0,0 +1,155 @@
{
stdenv,
lib,
fetchFromGitHub,
gnat,
gnatcoll-core,
gprbuild,
python3,
ocamlPackages,
makeWrapper,
gpr2,
}:
let
gnat_version = lib.versions.major gnat.version;
# gnatprove fsf-14 requires gpr2 from a special branch
gpr2_24_2_next =
(gpr2.override {
# pregenerated kb db is not included
gpr2kbdir = "${gprbuild}/share/gprconfig";
}).overrideAttrs
(old: rec {
version = "24.2.0-next";
src = fetchFromGitHub {
owner = "AdaCore";
repo = "gpr";
rev = "v${version}";
hash = "sha256-Tp+N9VLKjVWs1VRPYE0mQY3rl4E5iGb8xDoNatEYBg4=";
};
});
fetchSpark2014 =
{ rev, hash }:
fetchFromGitHub {
owner = "AdaCore";
repo = "spark2014";
fetchSubmodules = true;
inherit rev hash;
};
spark2014 = {
"12" = {
src = fetchSpark2014 {
rev = "ab34e07080a769b63beacc141707b5885c49d375"; # branch fsf-12
hash = "sha256-7pe3eWitpxmqzjW6qEIEuN0qr2IR+kJ7Ssc9pTBcCD8=";
};
commit_date = "2022-05-25";
};
"13" = {
src = fetchSpark2014 {
rev = "12db22e854defa9d1c993ef904af1e72330a68ca"; # branch fsf-13
hash = "sha256-mZWP9yF1O4knCiXx8CqolnS+93bM+hTQy40cd0HZmwI=";
};
commit_date = "2023-01-05";
patches = [
# Changes to the GNAT frontend: https://github.com/AdaCore/spark2014/issues/58
./0003-Adjust-after-category-change-for-N_Formal_Package_De.patch
];
};
"14" = {
src = fetchSpark2014 {
rev = "ce5fad038790d5dc18f9b5345dc604f1ccf45b06"; # branch fsf-14
hash = "sha256-WprJJIe/GpcdabzR2xC2dAV7kIYdNTaTpNYoR3UYTVo=";
};
patches = [
# Disable Coq related targets which are missing in the fsf-14 branch
./0001-fix-install.patch
# Suppress warnings on aarch64: https://github.com/AdaCore/spark2014/issues/54
./0002-mute-aarch64-warnings.patch
# Changes to the GNAT frontend: https://github.com/AdaCore/spark2014/issues/58
./0003-Adjust-after-category-change-for-N_Formal_Package_De.patch
];
commit_date = "2024-01-11";
};
};
thisSpark =
spark2014.${gnat_version}
or (throw "GNATprove depends on a specific GNAT version and can't be built using GNAT ${gnat_version}.");
in
stdenv.mkDerivation {
pname = "gnatprove";
version = "fsf-${gnat_version}_${thisSpark.commit_date}";
src = thisSpark.src;
patches = thisSpark.patches or [ ];
nativeBuildInputs = [
gnat
gprbuild
python3
makeWrapper
]
++ (with ocamlPackages; [
ocaml
findlib
menhir
]);
buildInputs = [
gnatcoll-core
]
++ (with ocamlPackages; [
ocamlgraph
zarith
ppx_deriving
ppx_sexp_conv
camlzip
menhirLib
num
re
sexplib
yojson
])
++ (lib.optionals (gnat_version == "14") [
gpr2_24_2_next
]);
propagatedBuildInputs = [
gprbuild
];
postPatch = ''
# gnat2why/gnat_src points to the GNAT sources
tar xf ${gnat.cc.src} --wildcards 'gcc-*/gcc/ada'
mv gcc-*/gcc/ada gnat2why/gnat_src
'';
configurePhase = ''
runHook preConfigure
make setup
runHook postConfigure
'';
installPhase = ''
runHook preInstall
make install-all
cp -a ./install/. $out
mkdir $out/share/gpr
ln -s $out/lib/gnat/* $out/share/gpr/
runHook postInstall
'';
meta = with lib; {
description = "Software development technology specifically designed for engineering high-reliability applications";
homepage = "https://github.com/AdaCore/spark2014";
maintainers = [ maintainers.jiegec ];
license = licenses.gpl3;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchurl,
gprbuild,
which,
gnat,
xmlada,
gnatcoll-core,
gnatcoll-iconv,
gnatcoll-gmp,
enableShared ? !stdenv.hostPlatform.isStatic,
# kb database source, if null assume it is pregenerated
gpr2kbdir ? null,
}:
stdenv.mkDerivation rec {
pname = "gpr2";
version = "25.0.0";
src = fetchurl {
url = "https://github.com/AdaCore/gpr/releases/download/v${version}/gpr2-with-gprconfig_kb-${lib.versions.majorMinor version}.tgz";
sha512 = "70fe0fcf541f6d3d90a34cab1638bbc0283dcd765c000406e0cfb73bae1817b30ddfe73f3672247a97c6b6bfc41900bc96a4440ca0c660f9c2f7b9d3cc8f8dcf";
};
nativeBuildInputs = [
which
gnat
gprbuild
];
makeFlags = [
"prefix=$(out)"
"PROCESSORS=$(NIX_BUILD_CORES)"
"ENABLE_SHARED=${if enableShared then "yes" else "no"}"
"GPR2_BUILD=release"
]
++ lib.optionals (gpr2kbdir != null) [
"GPR2KBDIR=${gpr2kbdir}"
];
configurePhase = ''
runHook preConfigure
make setup "''${makeFlagsArray[@]}" $makeFlags
runHook postConfigure
'';
# fool make into thinking pregenerated targets are up to date
preBuild = lib.optionalString (gpr2kbdir == null) ''
touch .build/kb/{*.adb,*.ads,collect_kb}
'';
propagatedBuildInputs = [
xmlada
gnatcoll-gmp
gnatcoll-core
gnatcoll-iconv
];
meta = with lib; {
description = "Framework for analyzing the GNAT Project (GPR) files";
homepage = "https://github.com/AdaCore/gpr";
license = with licenses; [
asl20
gpl3Only
];
maintainers = with maintainers; [ heijligen ];
platforms = platforms.all;
# TODO(@sternenseemann): investigate failure with gnat 13
broken = lib.versionOlder gnat.version "14";
};
}

View File

@@ -0,0 +1,99 @@
{
stdenv,
lib,
fetchFromGitHub,
gnat,
which,
xmlada, # for src
}:
let
version = "25.0.0";
gprConfigKbSrc = fetchFromGitHub {
name = "gprconfig-kb-${version}-src";
owner = "AdaCore";
repo = "gprconfig_kb";
rev = "v${version}";
sha256 = "09x1njq0i0z7fbwg0mg39r5ghy7369avbqvdycfj67lpmw17gb1r";
};
in
stdenv.mkDerivation {
pname = "gprbuild-boot";
inherit version;
src = fetchFromGitHub {
name = "gprbuild-${version}";
owner = "AdaCore";
repo = "gprbuild";
rev = "v${version}";
sha256 = "1mqsmc0q5bzg8223ls18kbvaz6mhzjz7ik8d3sqhhn24c0j6wjaw";
};
nativeBuildInputs = [
gnat
which
];
postPatch = ''
# The Makefile uses gprbuild to build gprbuild which
# we can't do at this point, delete it to prevent the
# default phases from failing.
rm Makefile
# make sure bootstrap script runs
patchShebangs --build bootstrap.sh
'';
# This setupHook populates GPR_PROJECT_PATH which is used by
# gprbuild to find dependencies. It works quite similar to
# the pkg-config setupHook in the sense that it also splits
# dependencies into GPR_PROJECT_PATH and GPR_PROJECT_PATH_FOR_BUILD,
# but gprbuild itself doesn't support this, so we'll need to
# introducing a wrapper for it in the future remains TODO.
# For the moment this doesn't matter since we have no situation
# were gprbuild is used to build something used at build time.
setupHooks = [
./gpr-project-path-hook.sh
]
++ lib.optionals stdenv.targetPlatform.isDarwin [
# This setupHook replaces the paths of shared libraries starting
# with @rpath with the absolute paths on Darwin, so that the
# binaries can be run without additional setup.
./gpr-project-darwin-rpath-hook.sh
];
installPhase = ''
runHook preInstall
./bootstrap.sh \
--with-xmlada=${xmlada.src} \
--with-kb=${gprConfigKbSrc} \
--prefix=$out
# Install custom compiler description which can detect nixpkgs'
# GNAT wrapper as a proper Ada compiler. The default compiler
# description expects the runtime library to be installed in
# the same prefix which isn't the case for nixpkgs. As a
# result, it would detect the unwrapped GNAT as a proper
# compiler which is unable to produce working binaries.
#
# Our compiler description is very similar to the upstream
# GNAT description except that we use a symlink in $out/nix-support
# created by the cc-wrapper to find the associated runtime
# libraries and use gnatmake instead of gnatls to find GNAT's
# bin directory.
install -m644 ${./nixpkgs-gnat.xml} $out/share/gprconfig/nixpkgs-gnat.xml
runHook postInstall
'';
meta = with lib; {
description = "Multi-language extensible build tool";
homepage = "https://github.com/AdaCore/gprbuild";
license = licenses.gpl3Plus;
maintainers = [ maintainers.sternenseemann ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,79 @@
{
lib,
stdenv,
gprbuild-boot,
which,
gnat,
xmlada,
}:
stdenv.mkDerivation {
pname = "gprbuild";
# See ./boot.nix for an explanation of the gprbuild setupHook,
# our custom knowledge base entry and the situation wrt a
# (future) gprbuild wrapper.
inherit (gprbuild-boot)
version
src
setupHooks
meta
;
nativeBuildInputs = [
gnat
gprbuild-boot
which
];
propagatedBuildInputs = [
xmlada
];
makeFlags = [
"ENABLE_SHARED=${if stdenv.hostPlatform.isStatic then "no" else "yes"}"
"PROCESSORS=$(NIX_BUILD_CORES)"
# confusingly, for gprbuild --target is autoconf --host
"TARGET=${stdenv.hostPlatform.config}"
"prefix=${placeholder "out"}"
]
++ lib.optionals (!stdenv.hostPlatform.isStatic) [
"LIBRARY_TYPE=relocatable"
];
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# Ensure that there is enough space for the `fixDarwinDylibNames` hook to
# update the install names of the output dylibs.
NIX_LDFLAGS = "-headerpad_max_install_names";
};
# Fixes gprbuild being linked statically always. Based on the AUR's patch:
# https://aur.archlinux.org/cgit/aur.git/plain/0001-Makefile-build-relocatable-instead-of-static-binary.patch?h=gprbuild&id=bac524c76cd59c68fb91ef4dfcbe427357b9f850
patches = lib.optionals (!stdenv.hostPlatform.isStatic) [
./gprbuild-relocatable-build.patch
];
buildFlags = [
"all"
"libgpr.build"
];
installFlags = [
"all"
"libgpr.install"
];
# link gprconfig_kb db from gprbuild-boot into build dir,
# the install process copies its contents to $out
preInstall = ''
# Use PATH to discover spliced gprbuild-boot from buildPackages,
# since path interpolation would give us gprbuild-boot from pkgsHostTarget
gprbuild_boot="$(dirname "$(type -p gprbuild)")/.."
ln -sf "$gprbuild_boot/share/gprconfig" share/gprconfig
'';
# no need for the install script
postInstall = ''
rm $out/doinstall
'';
}

View File

@@ -0,0 +1,10 @@
fixGprProjectDarwinRpath() {
for f in $(find $out -type f -executable); do
install_name_tool -id $f $f || true
for rpath in $(otool -L $f | grep @rpath | awk '{print $1}'); do
install_name_tool -change $rpath ${!outputLib}/lib/$(basename $rpath) $f || true
done
done
}
appendToVar preFixupPhases fixGprProjectDarwinRpath

View File

@@ -0,0 +1,8 @@
addAdaObjectsPath() {
local role_post
getHostRoleEnvHook
addToSearchPath "GPR_PROJECT_PATH${role_post}" "$1/share/gpr"
}
addEnvHooks "$targetOffset" addAdaObjectsPath

View File

@@ -0,0 +1,13 @@
diff --git a/Makefile b/Makefile
index 8c542078..e91cef5e 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,7 @@ LIB_INSTALLER=gprinstall -p -f --target=$(TARGET) $(RBD) "--prefix=${prefix}"
CLEANER=gprclean -q $(RBD)
GPRBUILD_BUILDER=$(BUILDER) $(GPRBUILD_GPR) \
- -XLIBRARY_TYPE=static -XXMLADA_BUILD=static
+ -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
LIBGPR_BUILDER=$(BUILDER) $(GPR_GPR) $(LIBGPR_OS)
LIBGPR_INSTALLER=$(LIB_INSTALLER) $(GPR_GPR) $(LIBGPR_OS) -XBUILD=${BUILD} \
--install-name=gpr \

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" ?>
<gprconfig>
<!-- This differs from the default GNAT compiler description
in the following ways:
* gnatmake is used over gnatls to detect the GNAT version
since the latter is not part of the wrapper.
* to find the runtime libraries, we rely on the symlink
../nix-support/gprconfig-gnat-unwrapped which is a
gprconfig-specific addition to the cc-wrapper we employ
for Ada compilers (which is only GNAT at the moment).
For documentation on this file format and its use refer to
https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/companion_tools.html#the-gprconfig-knowledge-base
-->
<compiler_description>
<!-- We would like to name this something different, so users
of gprconfig know this is something custom, nixpkgs-related,
but unfortunately the knowledge base depends on the name of
the compiler for e. g. linker settings.
-->
<name>GNAT</name>
<executable prefix="1">(.*-.*-.*)?gnatmake</executable>
<version>
<external>${PREFIX}gnatmake -v</external>
<grep regexp="^GNATMAKE.+?(\d+(\.\d+)?)" group="1"></grep>
</version>
<languages>Ada</languages>
<variable name="gcc_version">
<external>${PREFIX}gcc -v</external>
<grep regexp="^[-\w]*gcc \S+ (\S+)" group="1"></grep>
</variable>
<!-- The ada runtime libraries and objects are only part of the unwrapped
GNAT derivation. We can't symlink them into the wrapper derivation
(at least not the canonical location) since that screws with linking
against libraries distributed with gcc.
As a workaround, we create a symlink to the unwrapped GNAT's "out"
output in the cc-wrapper which we can read into a variable here and
use to find GNAT's Ada runtime.
-->
<variable name="gnat_unwrapped">
<external>readlink -n ${PATH}/../nix-support/gprconfig-gnat-unwrapped</external>
</variable>
<runtimes default="default,kernel,native">
<directory group="default" >$gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory>
<directory group="default" contents="^rts-">$gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path</directory>
<directory group="2" >$gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/</directory>
<directory group="1" >$gnat_unwrapped/$TARGET/lib/gnat/(.*)/adalib/</directory>
</runtimes>
<target>
<external>${PREFIX}gcc -dumpmachine</external>
<grep regexp="[^\r\n]+"></grep>
</target>
</compiler_description>
<configuration>
<!-- aarch64-linux - native compiler. -->
<targets>
<target name="^aarch64-unknown-linux-gnu$" />
</targets>
<hosts>
<host name="^aarch64-unknown-linux-gnu$" />
</hosts>
<config>
for Archive_Builder use ("ar", "cr");
for Archive_Builder_Append_Option use ("q");
for Archive_Indexer use ("ranlib");
for Archive_Suffix use ".a";
</config>
</configuration>
<configuration>
<!-- aarch64-linux - native compiler. -->
<targets>
<target name="^aarch64-unknown-linux-gnu$" />
</targets>
<hosts>
<host name="^aarch64-unknown-linux-gnu$" />
</hosts>
<config>
for Object_Lister use ("nm", "-g");
for Object_Lister_Matcher use " [TDRBSG] (.*)";
package Linker is
for Export_File_Format use "GNU";
for Export_File_Switch use "-Wl,--version-script=";
end Linker;
</config>
</configuration>
</gprconfig>

View File

@@ -0,0 +1,35 @@
{
stdenv,
lib,
fetchFromGitHub,
gnat,
# use gprbuild-boot since gprbuild proper depends
# on this xmlada derivation.
gprbuild-boot,
}:
stdenv.mkDerivation rec {
pname = "xmlada";
version = "25.0.0";
src = fetchFromGitHub {
name = "xmlada-${version}-src";
owner = "AdaCore";
repo = "xmlada";
rev = "v${version}";
sha256 = "sha256-UMJiXSHMS8+X5gyV1nmC29gF71BFnz7LNPQnwUMD3Yg=";
};
nativeBuildInputs = [
gnat
gprbuild-boot
];
meta = with lib; {
description = "XML/Ada: An XML parser for Ada";
homepage = "https://github.com/AdaCore/xmlada";
maintainers = [ maintainers.sternenseemann ];
license = licenses.gpl3Plus;
platforms = platforms.all;
};
}