From 066b51bf34d1e1818c510a02d1679f9b15523496 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Wed, 22 May 2024 17:38:39 +0000 Subject: [PATCH] gnatPackages.gpr2: init at 24.0.0 Co-authored-by: sternenseemann --- pkgs/development/ada-modules/gpr2/default.nix | 53 +++++++++++++++++++ pkgs/top-level/ada-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/ada-modules/gpr2/default.nix diff --git a/pkgs/development/ada-modules/gpr2/default.nix b/pkgs/development/ada-modules/gpr2/default.nix new file mode 100644 index 000000000000..1ad58b125db4 --- /dev/null +++ b/pkgs/development/ada-modules/gpr2/default.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + fetchurl, + gprbuild, + which, + gnat, + gnatcoll-core, + gnatcoll-iconv, + gnatcoll-gmp, + enableShared ? !stdenv.hostPlatform.isStatic, +}: + +stdenv.mkDerivation rec { + pname = "gpr2"; + version = "24.0.0"; + + src = fetchurl { + url = "https://github.com/AdaCore/gpr/releases/download/v${version}/gpr2-with-lkparser-${lib.versions.majorMinor version}.tgz"; + sha256 = "1g90689k94q3ma7q76gnjipfblgfvcq6ldwbzcf0l5hx6n8vbly8"; + }; + + nativeBuildInputs = [ + which + gnat + gprbuild + ]; + + makeFlags = [ + "prefix=$(out)" + "GPR2KBDIR=${gprbuild}/share/gprconfig" + "PROCESSORS=$(NIX_BUILD_CORES)" + "ENABLE_SHARED=${if enableShared then "yes" else "no"}" + ]; + + propagatedBuildInputs = [ + gprbuild + gnatcoll-gmp + gnatcoll-core + gnatcoll-iconv + ]; + + meta = with lib; { + description = "The 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; + }; +} diff --git a/pkgs/top-level/ada-packages.nix b/pkgs/top-level/ada-packages.nix index 2d3d0c4dc3fa..ad29103deb22 100644 --- a/pkgs/top-level/ada-packages.nix +++ b/pkgs/top-level/ada-packages.nix @@ -12,6 +12,8 @@ makeScopeWithSplicing' { f = (self: { inherit gnat; + gpr2 = self.callPackage ../development/ada-modules/gpr2 { }; + gprbuild-boot = self.callPackage ../development/ada-modules/gprbuild/boot.nix { }; gprbuild = self.callPackage ../development/ada-modules/gprbuild { };