about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ada-modules/gnatcoll/core.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ada-modules/gnatcoll/core.nix')
-rw-r--r--nixpkgs/pkgs/development/ada-modules/gnatcoll/core.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ada-modules/gnatcoll/core.nix b/nixpkgs/pkgs/development/ada-modules/gnatcoll/core.nix
new file mode 100644
index 000000000000..7fdd4e99d550
--- /dev/null
+++ b/nixpkgs/pkgs/development/ada-modules/gnatcoll/core.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, lib
+, gnat
+, gprbuild
+, fetchFromGitHub
+, xmlada
+, which
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gnatcoll-core";
+  version = "24.0.0";
+
+  src = fetchFromGitHub {
+    owner = "AdaCore";
+    repo = "gnatcoll-core";
+    rev = "v${version}";
+    sha256 = "1cks2w0inj9hvamsdxjriwxnx1igmx2khhr6kwxshsl30rs8nzvb";
+  };
+
+  nativeBuildInputs = [
+    gprbuild
+    which
+    gnat
+  ];
+
+  # propagate since gprbuild needs to find
+  # referenced GPR project definitions
+  propagatedBuildInputs = [
+    gprbuild # libgpr
+  ];
+
+  makeFlags = [
+    "prefix=${placeholder "out"}"
+    "PROCESSORS=$(NIX_BUILD_CORES)"
+    # confusingly, for gprbuild --target is autoconf --host
+    "TARGET=${stdenv.hostPlatform.config}"
+  ];
+
+  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;
+  };
+}