biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / ada-modules / gprbuild / nixpkgs-gnat.xml
blobead88dc365c1efb523e1ba885db2c66086f08aef
1 <?xml version="1.0" ?>
2 <gprconfig>
3   <!-- This differs from the default GNAT compiler description
4        in the following ways:
6        * gnatmake is used over gnatls to detect the GNAT version
7          since the latter is not part of the wrapper.
8        * to find the runtime libraries, we rely on the symlink
9          ../nix-support/gprconfig-gnat-unwrapped which is a
10          gprconfig-specific addition to the cc-wrapper we employ
11          for Ada compilers (which is only GNAT at the moment).
13        For documentation on this file format and its use refer to
14        https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/companion_tools.html#the-gprconfig-knowledge-base
15   -->
16   <compiler_description>
17     <!-- We would like to name this something different, so users
18          of gprconfig know this is something custom, nixpkgs-related,
19          but unfortunately the knowledge base depends on the name of
20          the compiler for e. g. linker settings.
21     -->
22     <name>GNAT</name>
23     <executable prefix="1">(.*-.*-.*)?gnatmake</executable>
24     <version>
25       <external>${PREFIX}gnatmake -v</external>
26       <grep regexp="^GNATMAKE.+?(\d+(\.\d+)?)" group="1"></grep>
27     </version>
28     <languages>Ada</languages>
29     <variable name="gcc_version">
30       <external>${PREFIX}gcc -v</external>
31       <grep regexp="^[-\w]*gcc \S+ (\S+)" group="1"></grep>
32     </variable>
33     <!-- The ada runtime libraries and objects are only part of the unwrapped
34          GNAT derivation. We can't symlink them into the wrapper derivation
35          (at least not the canonical location) since that screws with linking
36          against libraries distributed with gcc.
38          As a workaround, we create a symlink to the unwrapped GNAT's "out"
39          output in the cc-wrapper which we can read into a variable here and
40          use to find GNAT's Ada runtime.
41     -->
42     <variable name="gnat_unwrapped">
43       <external>readlink -n ${PATH}/../nix-support/gprconfig-gnat-unwrapped</external>
44     </variable>
45     <runtimes default="default,kernel,native">
46        <directory group="default" >$gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory>
47        <directory group="default" contents="^rts-">$gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path</directory>
48        <directory group="2" >$gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/</directory>
49        <directory group="1" >$gnat_unwrapped/$TARGET/lib/gnat/(.*)/adalib/</directory>
50     </runtimes>
51     <target>
52       <external>${PREFIX}gcc -dumpmachine</external>
53       <grep regexp="[^\r\n]+"></grep>
54     </target>
55   </compiler_description>
56 </gprconfig>