[bug#34265,4/9] gnu: ocaml-stdio: Fix libdir install

Message ID 871s4sycn5.fsf@gmail.com
State Accepted
Headers show
Series [bug#34265,1/9] gnu: dune: Update to 1.6.3. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Gabriel Hondet Jan. 31, 2019, 4:39 p.m. UTC
---
 gnu/packages/ocaml.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 946360833..94b108961 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5090,7 +5090,18 @@  is now @code{Ocaml_common.Ast_helper}.")
     (inputs `(("ocaml-base" ,ocaml-base)
               ("ocaml-sexplib0" ,ocaml-sexplib0)))
     (arguments
-     '(#:tests? #f)) ;no tests
+     '(#:tests? #f ;no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           ;; set libdir to use ocaml-site
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (invoke "dune" "install"
+                       (string-append "--prefix=" out)
+                       (string-append "--libdir=" out
+                                      "/lib/ocaml/site-lib")))
+             #t)))))
     (synopsis "Standard IO library for OCaml")
     (description
      "Stdio implements simple input/output functionalities for OCaml.  It