gnatPackages: Add scope for all ada packages

Ada depencencies musst be build with the same gnat version as the
project. Use a namespace as preperation to build with different gnat
versions.

gprbuild and gnatprove are still globaly visable.
This commit is contained in:
Thomas Heijligen 2024-02-19 20:17:42 +00:00 committed by sternenseemann
parent c02503b582
commit f2a142727c
16 changed files with 68 additions and 41 deletions

View File

@ -88,7 +88,7 @@ self: let
]; ];
buildInputs = [ buildInputs = [
pkgs.gnatcoll-xref pkgs.gnatPackages.gnatcoll-xref
]; ];
buildPhase = '' buildPhase = ''

View File

@ -377,7 +377,7 @@ stdenv.mkDerivation {
# this symlink points to the unwrapped gnat's output "out". It is used by # this symlink points to the unwrapped gnat's output "out". It is used by
# our custom gprconfig compiler description to find GNAT's ada runtime. See # our custom gprconfig compiler description to find GNAT's ada runtime. See
# ../../development/tools/build-managers/gprbuild/{boot.nix, nixpkgs-gnat.xml} # ../../development/ada-modules/gprbuild/{boot.nix, nixpkgs-gnat.xml}
ln -sf ${cc} $out/nix-support/gprconfig-gnat-unwrapped ln -sf ${cc} $out/nix-support/gprconfig-gnat-unwrapped
'' ''

View File

@ -0,0 +1,45 @@
{ lib
, pkgs
, makeScopeWithSplicing'
, generateSplicesForMkScope
, gnat
}:
let
gnat_version = lib.versions.major gnat.version;
in
makeScopeWithSplicing' {
otherSplices = generateSplicesForMkScope ("gnat" + gnat_version + "Packages");
f = (self: {
inherit gnat;
gprbuild-boot = self.callPackage ../development/ada-modules/gprbuild/boot.nix { };
gprbuild = self.callPackage ../development/ada-modules/gprbuild { };
xmlada = self.callPackage ../development/ada-modules/xmlada { };
gnatprove = self.callPackage ../development/ada-modules/gnatprove {
ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_14;
};
gnatcoll-core = self.callPackage ../development/ada-modules/gnatcoll/core.nix { };
# gnatcoll-bindings repository
gnatcoll-gmp = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "gmp"; };
gnatcoll-iconv = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "iconv"; };
gnatcoll-lzma = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "lzma"; };
gnatcoll-omp = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "omp"; };
gnatcoll-python3 = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "python3"; python3 = pkgs.python39; };
gnatcoll-readline = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "readline"; };
gnatcoll-syslog = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "syslog"; };
gnatcoll-zlib = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "zlib"; };
# gnatcoll-db repository
gnatcoll-postgres = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "postgres"; };
gnatcoll-sql = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "sql"; };
gnatcoll-sqlite = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "sqlite"; };
gnatcoll-xref = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "xref"; };
gnatcoll-db2ada = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "gnatcoll_db2ada"; };
gnatinspect = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "gnatinspect"; };
});
}

View File

@ -349,6 +349,21 @@ mapAliases ({
gnatboot11 = gnat-bootstrap11; gnatboot11 = gnat-bootstrap11;
gnatboot12 = gnat-bootstrap12; gnatboot12 = gnat-bootstrap12;
gnatboot = gnat-bootstrap; gnatboot = gnat-bootstrap;
gnatcoll-core = gnatPackages.gnatcoll-core; # Added 2024-02-25
gnatcoll-gmp = gnatPackages.gnatcoll-gmp; # Added 2024-02-25
gnatcoll-iconv = gnatPackages.gnatcoll-iconv; # Added 2024-02-25
gnatcoll-lzma = gnatPackages.gnatcoll-lzma; # Added 2024-02-25
gnatcoll-omp = gnatPackages.gnatcoll-omp; # Added 2024-02-25
gnatcoll-python3 = gnatPackages.gnatcoll-python3; # Added 2024-02-25
gnatcoll-readline = gnatPackages.gnatcoll-readline; # Added 2024-02-25
gnatcoll-syslog = gnatPackages.gnatcoll-syslog; # Added 2024-02-25
gnatcoll-zlib = gnatPackages.gnatcoll-zlib; # Added 2024-02-25
gnatcoll-postgres = gnatPackages.gnatcoll-postgres; # Added 2024-02-25
gnatcoll-sql = gnatPackages.gnatcoll-sql; # Added 2024-02-25
gnatcoll-sqlite = gnatPackages.gnatcoll-sqlite; # Added 2024-02-25
gnatcoll-xref = gnatPackages.gnatcoll-xref; # Added 2024-02-25
gnatcoll-db2ada = gnatPackages.gnatcoll-db2ada; # Added 2024-02-25
gnatinspect = gnatPackages.gnatinspect; # Added 2024-02-25
gnome-firmware-updater = gnome-firmware; # added 2022-04-14 gnome-firmware-updater = gnome-firmware; # added 2022-04-14
gnome-passwordsafe = gnome-secrets; # added 2022-01-30 gnome-passwordsafe = gnome-secrets; # added 2022-01-30
gnome-mpv = throw "'gnome-mpv' has been renamed to/replaced by 'celluloid'"; # Converted to throw 2023-09-10 gnome-mpv = throw "'gnome-mpv' has been renamed to/replaced by 'celluloid'"; # Converted to throw 2023-09-10
@ -393,7 +408,7 @@ mapAliases ({
gocode = throw "'gocode' has been removed as the upstream project was archived. 'gopls' is suggested as replacement"; # Added 2023-12-26 gocode = throw "'gocode' has been removed as the upstream project was archived. 'gopls' is suggested as replacement"; # Added 2023-12-26
govendor = throw "'govendor' has been removed as it is no longer maintained upstream, please use Go modules instead"; # Added 2023-12-26 govendor = throw "'govendor' has been removed as it is no longer maintained upstream, please use Go modules instead"; # Added 2023-12-26
gometer = throw "gometer has been removed from nixpkgs because goLance stopped offering Linux support"; # Added 2023-02-10 gometer = throw "gometer has been removed from nixpkgs because goLance stopped offering Linux support"; # Added 2023-02-10
gprbuild-boot = gnatPackages.gprbuild-boot; # Added 2024-02-25;
graalvm11-ce = throw "graalvm11-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 graalvm11-ce = throw "graalvm11-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26
graalvm17-ce = throw "graalvm17-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 graalvm17-ce = throw "graalvm17-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26
graalvm19-ce = throw "graalvm19-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 graalvm19-ce = throw "graalvm19-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26
@ -1174,6 +1189,7 @@ mapAliases ({
xdg_utils = xdg-utils; # Added 2021-02-01 xdg_utils = xdg-utils; # Added 2021-02-01
xineLib = xine-lib; # Added 2021-04-27 xineLib = xine-lib; # Added 2021-04-27
xineUI = xine-ui; # Added 2021-04-27 xineUI = xine-ui; # Added 2021-04-27
xmlada = gnatPackages.xmlada; # Added 2024-02-25
xonsh-unwrapped = throw "'xonsh-unwrapped' was incorporated into xonsh code; call xonsh directly instead."; # Added 2024-01-20 xonsh-unwrapped = throw "'xonsh-unwrapped' was incorporated into xonsh code; call xonsh directly instead."; # Added 2024-01-20
xtrt = throw "xtrt has been removed due to being abandoned"; # Added 2023-05-25 xtrt = throw "xtrt has been removed due to being abandoned"; # Added 2023-05-25
xulrunner = firefox-unwrapped; # Added 2023-11-03 xulrunner = firefox-unwrapped; # Added 2023-11-03

View File

@ -16075,9 +16075,10 @@ with pkgs;
bintools = bintoolsDualAs; bintools = bintoolsDualAs;
}); });
gnatprove = callPackage ../development/libraries/ada/gnatprove { gnatPackages = recurseIntoAttrs (callPackage ./ada-packages.nix { gnat = buildPackages.gnat; });
ocamlPackages = ocaml-ng.ocamlPackages_4_14; inherit (gnatPackages)
}; gprbuild
gnatprove;
gnu-smalltalk = callPackage ../development/compilers/gnu-smalltalk { }; gnu-smalltalk = callPackage ../development/compilers/gnu-smalltalk { };
@ -19117,14 +19118,6 @@ with pkgs;
global = callPackage ../development/tools/misc/global { }; global = callPackage ../development/tools/misc/global { };
gnatcoll-db2ada = callPackage ../development/libraries/ada/gnatcoll/db.nix {
component = "gnatcoll_db2ada";
};
gnatinspect = callPackage ../development/libraries/ada/gnatcoll/db.nix {
component = "gnatinspect";
};
gnome-doc-utils = callPackage ../development/tools/documentation/gnome-doc-utils { }; gnome-doc-utils = callPackage ../development/tools/documentation/gnome-doc-utils { };
gnome-desktop-testing = callPackage ../development/tools/gnome-desktop-testing { }; gnome-desktop-testing = callPackage ../development/tools/gnome-desktop-testing { };
@ -19169,10 +19162,6 @@ with pkgs;
gotty = callPackage ../servers/gotty { }; gotty = callPackage ../servers/gotty { };
gprbuild-boot = callPackage ../development/tools/build-managers/gprbuild/boot.nix { };
gprbuild = callPackage ../development/tools/build-managers/gprbuild { };
gputils = callPackage ../development/embedded/gputils { }; gputils = callPackage ../development/embedded/gputils { };
gpuvis = callPackage ../development/tools/misc/gpuvis { }; gpuvis = callPackage ../development/tools/misc/gpuvis { };
@ -21578,27 +21567,6 @@ with pkgs;
gl3w = callPackage ../development/libraries/gl3w { }; gl3w = callPackage ../development/libraries/gl3w { };
gnatcoll-core = callPackage ../development/libraries/ada/gnatcoll/core.nix { };
# gnatcoll-bindings repository
gnatcoll-gmp = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "gmp"; };
gnatcoll-iconv = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "iconv"; };
gnatcoll-lzma = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "lzma"; };
gnatcoll-omp = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "omp"; };
gnatcoll-python3 = callPackage ../development/libraries/ada/gnatcoll/bindings.nix {
component = "python3";
python3 = python39;
};
gnatcoll-readline = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "readline"; };
gnatcoll-syslog = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "syslog"; };
gnatcoll-zlib = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "zlib"; };
# gnatcoll-db repository
gnatcoll-postgres = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "postgres"; };
gnatcoll-sql = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "sql"; };
gnatcoll-sqlite = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "sqlite"; };
gnatcoll-xref = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "xref"; };
gns3Packages = dontRecurseIntoAttrs (callPackage ../applications/networking/gns3 { }); gns3Packages = dontRecurseIntoAttrs (callPackage ../applications/networking/gns3 { });
gns3-gui = gns3Packages.guiStable; gns3-gui = gns3Packages.guiStable;
gns3-server = gns3Packages.serverStable; gns3-server = gns3Packages.serverStable;
@ -25494,8 +25462,6 @@ with pkgs;
xmake-core-sv = callPackage ../development/libraries/xmake-core-sv { }; xmake-core-sv = callPackage ../development/libraries/xmake-core-sv { };
xmlada = callPackage ../development/libraries/ada/xmlada { };
xmlrpc_c = callPackage ../development/libraries/xmlrpc-c { }; xmlrpc_c = callPackage ../development/libraries/xmlrpc-c { };
xmlsec = callPackage ../development/libraries/xmlsec { }; xmlsec = callPackage ../development/libraries/xmlsec { };