gnatprove: Expose SPARKlib through gpr

SPARKlib is shipped with gnatprove / spark2014 but the gpr files are in
lib/gnat/. Nix gprbuild cant pick them up there. Link them to a location
where gprbuild can find them.
This commit is contained in:
Thomas Heijligen 2024-02-21 21:20:59 +00:00 committed by sternenseemann
parent d22ba0a2a7
commit c02503b582

@ -64,6 +64,10 @@ stdenv.mkDerivation rec {
ocamlPackages.zarith
];
propagatedBuildInputs = [
gprbuild
];
postPatch = ''
# gnat2why/gnat_src points to the GNAT sources
tar xf ${gnat.cc.src} gcc-${gnat.cc.version}/gcc/ada
@ -77,6 +81,8 @@ stdenv.mkDerivation rec {
installPhase = ''
make install-all
cp -a ./install/. $out
mkdir $out/share/gpr
ln -s $out/lib/gnat/* $out/share/gpr/
'';
meta = with lib; {