hi,
here are a few ocaml-related patches. The first one adds a
native-search-path so ocaml-findlib can find the libraries it
installs. Next, lablgtk is updated and installed using the recommended
way, with findlib. Then this new lablgtk is used to build coqide.
>From 3175122a301ad87c65102ee5aae960e91d879db3 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <jul...@lepiller.eu>
Date: Mon, 12 Dec 2016 22:58:28 +0100
Subject: [PATCH 1/8] gnu: ocaml-findlib: Use OCAMLPATH to locate OCaml
modules.
* gnu/packages/ocaml.scm (ocaml-findlib): Add OCAMLPATH to native-search-path.
---
gnu/packages/ocaml.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 61d51074e..6b9e3d283 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -683,6 +683,10 @@ to the other.")
"02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
(patches (search-patches "ocaml-findlib-make-install.patch"))))
(build-system gnu-build-system)
+ (native-search-paths
+ (list (search-path-specification
+ (variable "OCAMLPATH")
+ (files (list (string-append "lib/ocaml/site-lib"))))))
(native-inputs
`(("camlp4" ,camlp4)
("m4" ,m4)
--
2.11.0
From 18e4e71653ecdd8c547e056890e85d52fcc123f0 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <jul...@lepiller.eu>
Date: Mon, 12 Dec 2016 20:22:57 +0100
Subject: [PATCH 2/8] gnu: lablgtk: Update to 2.18.5
* gnu/packages/ocaml.scm (lablgtk): Update to 2.18.5.
---
gnu/packages/ocaml.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6b9e3d283..30c1da928 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2016 Eric Bavier <bav...@member.fsf.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <jann...@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efr...@flashner.co.il>
+;;; Copyright © 2016 Julien Lepiller <jul...@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -493,15 +494,15 @@ Knuthâs LR(1) parser construction technique.")
(define-public lablgtk
(package
(name "lablgtk")
- (version "2.18.3")
+ (version "2.18.5")
(source
(origin
(method url-fetch)
(uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
- "1479/lablgtk-2.18.3.tar.gz"))
+ "1627/lablgtk-2.18.5.tar.gz"))
(sha256
(base32
- "1bybn3jafxf4cx25zvn8h2xj9agn1xjbn7j3ywxxqx6az7rfnnwp"))))
+ "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
(build-system gnu-build-system)
(native-inputs
`(("camlp4" ,camlp4)
--
2.11.0
From 08262bc2bc7a13eb64acf1a51f9eaa7dd0c9f356 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <jul...@lepiller.eu>
Date: Mon, 12 Dec 2016 21:40:42 +0100
Subject: [PATCH 3/8] gnu: lablgtk: Use ocaml-find for installation
* gnu/packages/ocaml.scm (lablgtk): Use ocaml-find in installation.
---
gnu/packages/ocaml.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 30c1da928..786dc3497 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -507,6 +507,7 @@ Knuthâs LR(1) parser construction technique.")
(native-inputs
`(("camlp4" ,camlp4)
("ocaml" ,ocaml)
+ ("findlib" ,ocaml-findlib)
("pkg-config" ,pkg-config)))
;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
;; and gtk+-quartz-2.0 once available.
@@ -521,21 +522,24 @@ Knuthâs LR(1) parser construction technique.")
`(#:tests? #f ; no check target
;; opt: also install cmxa files
- #:make-flags (list "all" "opt")
+ #:make-flags (list "all" "opt"
+ (string-append "FINDLIBDIR="
+ (assoc-ref %outputs "out")
+ "/lib/ocaml/site-lib"))
;; Occasionally we would get "Error: Unbound module GtkThread" when
;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
#:parallel-build? #f
#:phases
(modify-phases %standard-phases
- (replace 'install
+ (add-before 'install 'prepare-install
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(ocaml (assoc-ref inputs "ocaml")))
;; Install into the output and not the ocaml directory.
+ (mkdir-p (string-append out "/lib/ocaml/site-lib"))
(substitute* "config.make"
((ocaml) out))
- (system* "make" "old-install")
#t))))))
(home-page "http://lablgtk.forge.ocamlcore.org/")
(synopsis "GTK+ bindings for OCaml")
--
2.11.0
>From c37d32ea82757389c29db1a276cac1225e639020 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <jul...@lepiller.eu>
Date: Mon, 12 Dec 2016 22:21:42 +0100
Subject: [PATCH 4/8] gnu: coq: Build coqide
* gnu/packages/ocaml.scm (coq): Build coqide.
---
gnu/packages/ocaml.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 786dc3497..8ad053184 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -344,19 +344,24 @@ written in Objective Caml.")
("hevea" ,hevea)))
(inputs
`(("ocaml" ,ocaml)
+ ("lablgtk" ,lablgtk)
("camlp5" ,camlp5)))
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key outputs inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(mandir (string-append out "/share/man"))
+ (lablgtkdir (assoc-ref inputs "lablgtk"))
(browser "icecat -remote \"OpenURL(%s,new-tab)\""))
(zero? (system* "./configure"
"-prefix" out
"-mandir" mandir
- "-browser" browser)))))
+ "-browser" browser
+ "-lablgtkdir" (string-append lablgtkdir
+ "/lib/ocaml/site-lib/lablgtk2/")
+ "-coqide" "opt")))))
(replace 'build
(lambda _
(zero? (system* "make" "-j" (number->string
--
2.11.0