guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add ocaml-llvm.


From: guix-commits
Subject: branch master updated: gnu: Add ocaml-llvm.
Date: Tue, 16 Feb 2021 10:53:26 -0500

This is an automated email from the git hooks/post-receive script.

roptat pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 8f710cc  gnu: Add ocaml-llvm.
8f710cc is described below

commit 8f710cc598fb675d267f49a82cffc197f03ad52c
Author: Julien Lepiller <julien@lepiller.eu>
AuthorDate: Tue Feb 16 16:38:15 2021 +0100

    gnu: Add ocaml-llvm.
    
    * gnu/packages/ocaml.scm (make-ocaml-llvm, ocaml-llvm, ocaml-llvm-9)
    (ocaml-llvm-10, ocaml-llvm-11): New variables.
---
 gnu/packages/ocaml.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 03895d0..dec1f84 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6197,3 +6197,44 @@ provides support to program with time varying values: 
declarative events and
  signals.  React doesn't define any primitive event or signal, it lets the
 client chooses the concrete timeline.")
     (license license:lgpl2.1+)))
+
+(define (make-ocaml-llvm llvm)
+  (package
+    (inherit llvm)
+    (name "ocaml-llvm")
+    (outputs '("out"))
+    (arguments
+     `(#:configure-flags
+       (list
+         (string-append "-DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR="
+                        (assoc-ref %build-inputs "llvm") "/lib")
+         "-DBUILD_SHARED_LIBS=TRUE"
+         "-DLLVM_OCAML_OUT_OF_TREE=TRUE"
+         (string-append "-DLLVM_OCAML_INSTALL_PATH="
+                        (assoc-ref %outputs "out") "/lib/ocaml/site-lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda _
+             (invoke "make" "ocaml_all")))
+         (replace 'install
+           (lambda _
+             (invoke "cmake" "-P" "bindings/ocaml/cmake_install.cmake"))))))
+    (inputs
+     `(("llvm" ,llvm)))
+    (native-inputs
+     `(("ocaml" ,ocaml)
+       ("ocaml-findlib" ,ocaml-findlib)
+       ("ocaml-ounit" ,ocaml-ounit)
+       ("python" ,python)))
+    (propagated-inputs
+     `(("ocaml-integers" ,ocaml-integers)
+       ("ocaml-ctypes" ,ocaml-ctypes)))
+    (synopsis "OCaml bindings to LLVM")
+    (description "This package contains the OCaml bindings distributed with
+LLVM.")))
+
+(define-public ocaml-llvm (make-ocaml-llvm llvm))
+(define-public ocaml-llvm-9 (make-ocaml-llvm llvm-9))
+(define-public ocaml-llvm-10 (make-ocaml-llvm llvm-10))
+(define-public ocaml-llvm-11 (make-ocaml-llvm llvm-11))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]