gnu: ocaml-llvm: Remove duplicate package.

Commit 8f710cc598 introduced a duplicate
ocaml-llvm@9.0.1 package, which was flagged by a test failure in
tests/packages.scm.

* gnu/packages/ocaml.scm (make-ocaml-llvm): Define as 'mlambdaq'.
This commit is contained in:
Ludovic Courtès 2021-02-22 18:18:36 +01:00
parent 43cef0ba81
commit d8c80c671b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -87,6 +87,7 @@
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix svn-download) #:use-module (guix svn-download)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix memoization)
#:use-module ((srfi srfi-1) #:hide (zip))) #:use-module ((srfi srfi-1) #:hide (zip)))
;; A shortcut for files from ocaml forge. Downloaded files are computed from ;; A shortcut for files from ocaml forge. Downloaded files are computed from
@ -6198,41 +6199,44 @@ provides support to program with time varying values: declarative events and
client chooses the concrete timeline.") client chooses the concrete timeline.")
(license license:lgpl2.1+))) (license license:lgpl2.1+)))
(define (make-ocaml-llvm llvm) (define make-ocaml-llvm
(package ;; Make it a memoizing procedure so its callers below don't end up defining
(inherit llvm) ;; two equal-but-not-eq "ocaml-llvm" packages for the default LLVM.
(name "ocaml-llvm") (mlambdaq (llvm)
(outputs '("out")) (package
(arguments (inherit llvm)
`(#:configure-flags (name "ocaml-llvm")
(list (outputs '("out"))
(string-append "-DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR=" (arguments
(assoc-ref %build-inputs "llvm") "/lib") `(#:configure-flags
"-DBUILD_SHARED_LIBS=TRUE" (list
"-DLLVM_OCAML_OUT_OF_TREE=TRUE" (string-append "-DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR="
(string-append "-DLLVM_OCAML_INSTALL_PATH=" (assoc-ref %build-inputs "llvm") "/lib")
(assoc-ref %outputs "out") "/lib/ocaml/site-lib")) "-DBUILD_SHARED_LIBS=TRUE"
#:phases "-DLLVM_OCAML_OUT_OF_TREE=TRUE"
(modify-phases %standard-phases (string-append "-DLLVM_OCAML_INSTALL_PATH="
(replace 'build (assoc-ref %outputs "out") "/lib/ocaml/site-lib"))
(lambda _ #:phases
(invoke "make" "ocaml_all"))) (modify-phases %standard-phases
(replace 'install (replace 'build
(lambda _ (lambda _
(invoke "cmake" "-P" "bindings/ocaml/cmake_install.cmake")))))) (invoke "make" "ocaml_all")))
(inputs (replace 'install
`(("llvm" ,llvm))) (lambda _
(native-inputs (invoke "cmake" "-P" "bindings/ocaml/cmake_install.cmake"))))))
`(("ocaml" ,ocaml) (inputs
("ocaml-findlib" ,ocaml-findlib) `(("llvm" ,llvm)))
("ocaml-ounit" ,ocaml-ounit) (native-inputs
("python" ,python))) `(("ocaml" ,ocaml)
(propagated-inputs ("ocaml-findlib" ,ocaml-findlib)
`(("ocaml-integers" ,ocaml-integers) ("ocaml-ounit" ,ocaml-ounit)
("ocaml-ctypes" ,ocaml-ctypes))) ("python" ,python)))
(synopsis "OCaml bindings to LLVM") (propagated-inputs
(description "This package contains the OCaml bindings distributed with `(("ocaml-integers" ,ocaml-integers)
LLVM."))) ("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 (make-ocaml-llvm llvm))
(define-public ocaml-llvm-9 (make-ocaml-llvm llvm-9)) (define-public ocaml-llvm-9 (make-ocaml-llvm llvm-9))