* [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml).
@ 2017-01-02 17:38 David Craven
2017-01-02 17:38 ` [PATCH 2/4] gnu: Add ocaml-zarith David Craven
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: David Craven @ 2017-01-02 17:38 UTC (permalink / raw)
To: guix-devel
* gnu/packages/ocaml.scm (ocaml, opam, camlp4, camlp5, hevea, coq,
proof-general, ocaml-menhir, lablgtk, unison, ocaml-findlib)[license]:
Add prefix.
---
gnu/packages/ocaml.scm | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c5784db90..7bb9c6d7d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -24,7 +24,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages ocaml)
- #:use-module ((guix licenses) #:hide (zlib))
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix svn-download)
@@ -146,7 +146,7 @@ functional, imperative and object-oriented styles of programming.")
;; The compiler is distributed under qpl1.0 with a change to choice of
;; law: the license is governed by the laws of France. The library is
;; distributed under lgpl2.0.
- (license (list qpl lgpl2.0))))
+ (license (list license:qpl license:lgpl2.0))))
(define-public opam
(package
@@ -211,7 +211,7 @@ simultaneous compiler installations, flexible package constraints, and a
Git-friendly development workflow.")
;; The 'LICENSE' file waives some requirements compared to LGPLv3.
- (license lgpl3)))
+ (license license:lgpl3)))
(define-public camlp4
(package
@@ -253,7 +253,7 @@ syntax of OCaml.")
;; This is LGPLv2 with an exception that allows packages statically-linked
;; against the library to be released under any terms.
- (license lgpl2.0)))
+ (license license:lgpl2.0)))
(define-public camlp5
(package
@@ -294,7 +294,7 @@ syntax of OCaml.")
tools for syntax (Stream Parsers and Grammars) and the ability to modify the
concrete syntax of the language (Quotations, Syntax Extensions).")
;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
- (license (list bsd-3 qpl))))
+ (license (list license:bsd-3 license:qpl))))
(define-public hevea
(package
@@ -325,7 +325,7 @@ concrete syntax of the language (Quotations, Syntax Extensions).")
(description
"HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
written in Objective Caml.")
- (license qpl)))
+ (license license:qpl)))
(define-public coq
(package
@@ -378,7 +378,7 @@ development of computer programs consistent with their formal specification.
It is developed using Objective Caml and Camlp5.")
;; The code is distributed under lgpl2.1.
;; Some of the documentation is distributed under opl1.0+.
- (license (list lgpl2.1 opl1.0+))))
+ (license (list license:lgpl2.1 license:opl1.0+))))
(define-public proof-general
(package
@@ -456,7 +456,7 @@ It is developed using Objective Caml and Camlp5.")
"Proof General is a major mode to turn Emacs into an interactive proof
assistant to write formal mathematical proofs using a variety of theorem
provers.")
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public ocaml-menhir
(package
@@ -492,7 +492,7 @@ Knuth’s LR(1) parser construction technique.")
;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
;; that have an *.ml or *.mli extension are GPL licensed. All other files
;; are QPL licensed.
- (license (list gpl2+ qpl))))
+ (license (list license:gpl2+ license:qpl))))
(define-public lablgtk
(package
@@ -555,7 +555,7 @@ gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
gnomeui, gtksourceview, gtkspell,
libglade (and it an generate OCaml code from .glade files),
libpanel, librsvg and quartz.")
- (license lgpl2.1)))
+ (license license:lgpl2.1)))
(define-public unison
(package
@@ -676,7 +676,7 @@ a collection of files and directories to be stored on different hosts
(or different disks on the same host), modified separately, and then
brought up to date by propagating the changes in each replica
to the other.")
- (license gpl3+)))
+ (license license:gpl3+)))
(define-public ocaml-findlib
(package
@@ -724,4 +724,4 @@ dependency information about multiple packages. There is also a tool that
allows the user to enter queries on the command-line. In order to simplify
compilation and linkage, there are new frontends of the various OCaml
compilers that can directly deal with packages.")
- (license x11)))
+ (license license:x11)))
--
2.11.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] gnu: Add ocaml-zarith.
2017-01-02 17:38 [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) David Craven
@ 2017-01-02 17:38 ` David Craven
2017-01-03 12:30 ` Ludovic Courtès
2017-01-02 17:38 ` [PATCH 3/4] gnu: Reorder imports in (gnu packages ocaml) David Craven
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: David Craven @ 2017-01-02 17:38 UTC (permalink / raw)
To: guix-devel
* gnu/packages/ocaml.scm (ocaml-zarith): New variable.
---
gnu/packages/ocaml.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7bb9c6d7d..f6b79f75c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2016 David Craven <david@craven.ch>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -46,6 +47,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages m4)
+ #:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages version-control)
#:use-module (gnu packages curl))
@@ -296,6 +298,43 @@ concrete syntax of the language (Quotations, Syntax Extensions).")
;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
(license (list license:bsd-3 license:qpl))))
+(define-public ocaml-zarith
+ (package
+ (name "ocaml-zarith")
+ (version "1.4.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ocaml/Zarith/archive/"
+ "release-" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0770xwy0kcnba87wjw6sc5grm0r3mylxkc8gmyjhsy44zvjsqdij"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("ocaml" ,ocaml)
+ ("ocaml-findlib" ,ocaml-findlib)
+ ("perl" ,perl)))
+ (propagated-inputs
+ `(("gmp" ,gmp)))
+ (arguments
+ `(#:test-target "tests"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib/ocaml/site-lib")))
+ (mkdir-p lib)
+ ;; Does not use autoconf, automake.
+ (zero? (system* "./configure" "-installdir" lib))))))))
+ (home-page "https://github.com/ocaml/Zarith")
+ (synopsis "Management tool for OCaml libraries")
+ (description "The Zarith library implements arithmetic and logical
+operations over arbitrary-precision integers and rational numbers. The
+implementation is based on GMP and is very efficient.")
+ (license license:gpl2+)))
+
(define-public hevea
(package
(name "hevea")
--
2.11.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] gnu: Reorder imports in (gnu packages ocaml).
2017-01-02 17:38 [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) David Craven
2017-01-02 17:38 ` [PATCH 2/4] gnu: Add ocaml-zarith David Craven
@ 2017-01-02 17:38 ` David Craven
2017-01-03 12:30 ` Ludovic Courtès
2017-01-02 17:38 ` [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1 David Craven
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: David Craven @ 2017-01-02 17:38 UTC (permalink / raw)
To: guix-devel
* gnu/packages/ocaml.scm: Reorder imports alphabetically.
---
gnu/packages/ocaml.scm | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f6b79f75c..f962be8d4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -25,32 +25,32 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages ocaml)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix packages)
- #:use-module (guix download)
- #:use-module (guix svn-download)
- #:use-module (guix utils)
- #:use-module (guix build-system gnu)
#:use-module (gnu packages)
- #:use-module (gnu packages gcc)
- #:use-module (gnu packages gnome)
- #:use-module (gnu packages gtk)
#:use-module (gnu packages base)
- #:use-module (gnu packages emacs)
- #:use-module (gnu packages texinfo)
- #:use-module (gnu packages pkg-config)
#:use-module (gnu packages compression)
- #:use-module (gnu packages xorg)
- #:use-module (gnu packages tex)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages emacs)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages ghostscript)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages lynx)
- #:use-module (gnu packages perl)
- #:use-module (gnu packages python)
#:use-module (gnu packages m4)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages tex)
+ #:use-module (gnu packages texinfo)
#:use-module (gnu packages version-control)
- #:use-module (gnu packages curl))
+ #:use-module (gnu packages xorg)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix svn-download)
+ #:use-module (guix utils))
(define-public ocaml
(package
--
2.11.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1.
2017-01-02 17:38 [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) David Craven
2017-01-02 17:38 ` [PATCH 2/4] gnu: Add ocaml-zarith David Craven
2017-01-02 17:38 ` [PATCH 3/4] gnu: Reorder imports in (gnu packages ocaml) David Craven
@ 2017-01-02 17:38 ` David Craven
2017-01-02 20:51 ` Julien Lepiller
2017-01-03 11:03 ` Ben Woodcroft
2017-01-03 12:29 ` [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) Ludovic Courtès
2017-01-03 15:27 ` Danny Milosavljevic
4 siblings, 2 replies; 10+ messages in thread
From: David Craven @ 2017-01-02 17:38 UTC (permalink / raw)
To: guix-devel
* gnu/packages/ocaml.scm (ocaml-findlib)[arguments]: Move
ocaml-findlib-make-install.patch to phase and set ldconf="ignore" in
findlib.conf.in.
* gnu/local.mk (dist_patch_DATA): Remove old patch.
---
gnu/local.mk | 1 -
gnu/packages/ocaml.scm | 34 +++++++++++++++-------
.../patches/ocaml-findlib-make-install.patch | 20 -------------
3 files changed, 24 insertions(+), 31 deletions(-)
delete mode 100644 gnu/packages/patches/ocaml-findlib-make-install.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 6ab1c1c48..9e35b0d0b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -750,7 +750,6 @@ dist_patch_DATA = \
%D%/packages/patches/nvi-dbpagesize-binpower.patch \
%D%/packages/patches/nvi-db4.patch \
%D%/packages/patches/ocaml-CVE-2015-8869.patch \
- %D%/packages/patches/ocaml-findlib-make-install.patch \
%D%/packages/patches/ola-readdir-r.patch \
%D%/packages/patches/openexr-missing-samples.patch \
%D%/packages/patches/openjpeg-CVE-2016-5157.patch \
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f962be8d4..2d064408b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -720,15 +720,14 @@ to the other.")
(define-public ocaml-findlib
(package
(name "ocaml-findlib")
- (version "1.6.1")
+ (version "1.7.1")
(source (origin
(method url-fetch)
(uri (string-append "http://download.camlcity.org/download/"
"findlib" "-" version ".tar.gz"))
(sha256
(base32
- "02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
- (patches (search-patches "ocaml-findlib-make-install.patch"))))
+ "1vsys5gpahi36nxv5yx29zhwn8b2d7sqqswza05vxy5bx5wrljsx"))))
(build-system gnu-build-system)
(native-inputs
`(("camlp4" ,camlp4)
@@ -738,18 +737,33 @@ to the other.")
`(#:tests? #f ; no test suite
#:parallel-build? #f
#:make-flags (list "all" "opt")
- #:phases (modify-phases %standard-phases
- (replace
- 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (system*
- "./configure"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-findlib.conf.in
+ (lambda _
+ (let ((port (open-file "findlib.conf.in" "w" #:encoding "utf-8")))
+ (format port "ldconf=\"ignore\"~%")
+ (close-port port))
+ #t))
+ (add-after 'unpack 'patch-findlib-make-install
+ (lambda _
+ (substitute* "src/findlib/Makefile"
+ (("^.*topfind.*OCAML_CORE_STDLIB.*$")
+ "\ttest $(INSTALL_TOPFIND) -eq 0 || cp topfind \"$(prefix)$(OCAML_SITELIB)\"\n"))
+ #t))
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (system* "./configure"
"-bindir" (string-append out "/bin")
"-config" (string-append out "/etc/ocamfind.conf")
"-mandir" (string-append out "/share/man")
"-sitelib" (string-append out "/lib/ocaml/site-lib")
"-with-toolbox")))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "OCAMLPATH")
+ (files (list (string-append "lib/ocaml/site-lib"))))))
(home-page "http://projects.camlcity.org/projects/findlib.html")
(synopsis "Management tool for OCaml libraries")
(description
diff --git a/gnu/packages/patches/ocaml-findlib-make-install.patch b/gnu/packages/patches/ocaml-findlib-make-install.patch
deleted file mode 100644
index 238f9ca3c..000000000
--- a/gnu/packages/patches/ocaml-findlib-make-install.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Ocaml wants to install its "core" libraries in OCAML_CORE_STDLIB. That
-does not work in a store-based distribution.
-
-A solution was already provided by Nix
-
- https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/ocaml/findlib/install_topfind.patch
-
-regenerated for Guix.
-
---- findlib-1.5.3/src/findlib/Makefile 2014-09-16 13:21:46.000000000 +0200
-+++ findlib-1.5.3/src/findlib/Makefile.new 2014-10-01 14:30:54.141082521 +0200
-@@ -89,7 +89,7 @@
- install: all
- mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
- mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
-- test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
-+ test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_SITELIB)"
- files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
- cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
- f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
--
2.11.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1.
2017-01-02 17:38 ` [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1 David Craven
@ 2017-01-02 20:51 ` Julien Lepiller
2017-01-03 11:03 ` Ben Woodcroft
1 sibling, 0 replies; 10+ messages in thread
From: Julien Lepiller @ 2017-01-02 20:51 UTC (permalink / raw)
To: guix-devel
On January 2, 2017 6:38:14 PM GMT+01:00, David Craven <david@craven.ch> wrote:
>* gnu/packages/ocaml.scm (ocaml-findlib)[arguments]: Move
> ocaml-findlib-make-install.patch to phase and set ldconf="ignore" in
> findlib.conf.in.
>* gnu/local.mk (dist_patch_DATA): Remove old patch.
>---
> gnu/local.mk | 1 -
>gnu/packages/ocaml.scm | 34
>+++++++++++++++-------
> .../patches/ocaml-findlib-make-install.patch | 20 -------------
> 3 files changed, 24 insertions(+), 31 deletions(-)
>delete mode 100644
>gnu/packages/patches/ocaml-findlib-make-install.patch
>
>diff --git a/gnu/local.mk b/gnu/local.mk
>index 6ab1c1c48..9e35b0d0b 100644
>--- a/gnu/local.mk
>+++ b/gnu/local.mk
>@@ -750,7 +750,6 @@ dist_patch_DATA = \
> %D%/packages/patches/nvi-dbpagesize-binpower.patch \
> %D%/packages/patches/nvi-db4.patch \
> %D%/packages/patches/ocaml-CVE-2015-8869.patch \
>- %D%/packages/patches/ocaml-findlib-make-install.patch \
> %D%/packages/patches/ola-readdir-r.patch \
> %D%/packages/patches/openexr-missing-samples.patch \
> %D%/packages/patches/openjpeg-CVE-2016-5157.patch \
>diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>index f962be8d4..2d064408b 100644
>--- a/gnu/packages/ocaml.scm
>+++ b/gnu/packages/ocaml.scm
>@@ -720,15 +720,14 @@ to the other.")
> (define-public ocaml-findlib
> (package
> (name "ocaml-findlib")
>- (version "1.6.1")
>+ (version "1.7.1")
> (source (origin
> (method url-fetch)
> (uri (string-append "http://download.camlcity.org/download/"
> "findlib" "-" version ".tar.gz"))
> (sha256
> (base32
>-
>"02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
>- (patches (search-patches
>"ocaml-findlib-make-install.patch"))))
>+
>"1vsys5gpahi36nxv5yx29zhwn8b2d7sqqswza05vxy5bx5wrljsx"))))
> (build-system gnu-build-system)
> (native-inputs
> `(("camlp4" ,camlp4)
>@@ -738,18 +737,33 @@ to the other.")
> `(#:tests? #f ; no test suite
> #:parallel-build? #f
> #:make-flags (list "all" "opt")
>- #:phases (modify-phases %standard-phases
>- (replace
>- 'configure
>- (lambda* (#:key inputs outputs #:allow-other-keys)
>- (let ((out (assoc-ref outputs "out")))
>- (system*
>- "./configure"
>+ #:phases
>+ (modify-phases %standard-phases
>+ (add-after 'unpack 'patch-findlib.conf.in
>+ (lambda _
>+ (let ((port (open-file "findlib.conf.in" "w" #:encoding
>"utf-8")))
>+ (format port "ldconf=\"ignore\"~%")
>+ (close-port port))
>+ #t))
>+ (add-after 'unpack 'patch-findlib-make-install
>+ (lambda _
>+ (substitute* "src/findlib/Makefile"
>+ (("^.*topfind.*OCAML_CORE_STDLIB.*$")
>+ "\ttest $(INSTALL_TOPFIND) -eq 0 || cp topfind
>\"$(prefix)$(OCAML_SITELIB)\"\n"))
>+ #t))
>+ (replace 'configure
>+ (lambda* (#:key inputs outputs #:allow-other-keys)
>+ (let ((out (assoc-ref outputs "out")))
>+ (system* "./configure"
> "-bindir" (string-append out "/bin")
> "-config" (string-append out "/etc/ocamfind.conf")
> "-mandir" (string-append out "/share/man")
> "-sitelib" (string-append out "/lib/ocaml/site-lib")
> "-with-toolbox")))))))
>+ (native-search-paths
>+ (list (search-path-specification
>+ (variable "OCAMLPATH")
>+ (files (list (string-append "lib/ocaml/site-lib"))))))
You should add this to the ocaml definition, or move the definition from the compiler. If I'm not mistaken, this overrides the current definition and ocamlfind will not be able to find core modules in lib/ocaml such as 'bytes'.
> (home-page "http://projects.camlcity.org/projects/findlib.html")
> (synopsis "Management tool for OCaml libraries")
> (description
>diff --git a/gnu/packages/patches/ocaml-findlib-make-install.patch
>b/gnu/packages/patches/ocaml-findlib-make-install.patch
>deleted file mode 100644
>index 238f9ca3c..000000000
>--- a/gnu/packages/patches/ocaml-findlib-make-install.patch
>+++ /dev/null
>@@ -1,20 +0,0 @@
>-Ocaml wants to install its "core" libraries in OCAML_CORE_STDLIB.
>That
>-does not work in a store-based distribution.
>-
>-A solution was already provided by Nix
>-
>-
>https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/ocaml/findlib/install_topfind.patch
>-
>-regenerated for Guix.
>-
>---- findlib-1.5.3/src/findlib/Makefile 2014-09-16 13:21:46.000000000
>+0200
>-+++ findlib-1.5.3/src/findlib/Makefile.new 2014-10-01
>14:30:54.141082521 +0200
>-@@ -89,7 +89,7 @@
>- install: all
>- mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
>- mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
>-- test $(INSTALL_TOPFIND) -eq 0 || cp topfind
>"$(prefix)$(OCAML_CORE_STDLIB)"
>-+ test $(INSTALL_TOPFIND) -eq 0 || cp topfind
>"$(prefix)$(OCAML_SITELIB)"
>- files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi
>findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli
>fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi
>fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs
>findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a
>findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
>- cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
>- f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX)
>&& f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1.
2017-01-02 17:38 ` [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1 David Craven
2017-01-02 20:51 ` Julien Lepiller
@ 2017-01-03 11:03 ` Ben Woodcroft
1 sibling, 0 replies; 10+ messages in thread
From: Ben Woodcroft @ 2017-01-03 11:03 UTC (permalink / raw)
To: David Craven, guix-devel
[-- Attachment #1: Type: text/plain, Size: 3191 bytes --]
Hi David,
Thanks for this.
On 03/01/17 03:38, David Craven wrote:
> * gnu/packages/ocaml.scm (ocaml-findlib)[arguments]: Move
> ocaml-findlib-make-install.patch to phase and set ldconf="ignore" in
> findlib.conf.in.
> * gnu/local.mk (dist_patch_DATA): Remove old patch.
The deletion of the patch file itself should also be documented.
[...]
> - #:phases (modify-phases %standard-phases
> - (replace
> - 'configure
> - (lambda* (#:key inputs outputs #:allow-other-keys)
> - (let ((out (assoc-ref outputs "out")))
> - (system*
> - "./configure"
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'patch-findlib.conf.in
> + (lambda _
> + (let ((port (open-file "findlib.conf.in" "w" #:encoding "utf-8")))
> + (format port "ldconf=\"ignore\"~%")
> + (close-port port))
> + #t))
> + (add-after 'unpack 'patch-findlib-make-install
> + (lambda _
> + (substitute* "src/findlib/Makefile"
> + (("^.*topfind.*OCAML_CORE_STDLIB.*$")
> + "\ttest $(INSTALL_TOPFIND) -eq 0 || cp topfind \"$(prefix)$(OCAML_SITELIB)\"\n"))
> + #t))
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (system* "./configure"
> "-bindir" (string-append out "/bin")
> "-config" (string-append out "/etc/ocamfind.conf")
> "-mandir" (string-append out "/share/man")
> "-sitelib" (string-append out "/lib/ocaml/site-lib")
> "-with-toolbox")))))))
I had some trouble building downstream packages such as 'laby' after
this patch. Do you see the same?
> + (native-search-paths
> + (list (search-path-specification
> + (variable "OCAMLPATH")
> + (files (list (string-append "lib/ocaml/site-lib"))))))
This is unnecessary since this is already specified in the ocaml package
definition, right?
[...]
On a somewhat related note, I've been getting around ocaml-findlib
issues by adding this phase to downstream packages. WDYT?
(add-before 'install 'setup-install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(destdir (string-append out "/lib/ocaml")))
(mkdir-p destdir)
(setenv "OCAMLFIND_DESTDIR" destdir)
(setenv "OCAMLFIND_LDCONF" (string-append destdir
"/ld.conf"))
#t))))))
I've been preparing a few ocaml packages, and it is getting to the point
that it might be worth adding an ocaml-build-system, much like
gnu-build-system except perhaps with a few tweaks such as the above
(preliminary patch not adding anything ocaml/findlib-specific attached).
OTOH, I'm quite cautious about my knowledge of the OCaml ecosystem, so
I'm keen to hear others' opinions.
Thanks, ben.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-Add-OCaml-build-system.patch --]
[-- Type: text/x-patch; name="0001-build-Add-OCaml-build-system.patch", Size: 13992 bytes --]
From 5497df789597bedb3744af4d11d927a99dea229e Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Mon, 2 Jan 2017 17:11:13 +1000
Subject: [PATCH 1/5] build: Add OCaml build system.
* guix/build-system/ocaml.scm: New file.
* guix/build/ocaml-build-system: New file.
* Makefile.am (MODULES): Add new files.
* doc/guix.texi (Build Systems): Document ocaml-build-system. (TODO!!!)
* gnu/packages/games.scm (laby): Use ocaml-build-system.
* gnu/packages/ocaml.scm (opam, camlp4, camlp5, hevea, coq, proof-general,
ocaml-menhir, lablgtk, unison, ocaml-findlib): Likewise.
---
Makefile.am | 2 +
gnu/packages/games.scm | 5 +-
gnu/packages/ocaml.scm | 21 +++---
guix/build-system/ocaml.scm | 131 ++++++++++++++++++++++++++++++++++++++
guix/build/ocaml-build-system.scm | 41 ++++++++++++
5 files changed, 188 insertions(+), 12 deletions(-)
create mode 100644 guix/build-system/ocaml.scm
create mode 100644 guix/build/ocaml-build-system.scm
diff --git a/Makefile.am b/Makefile.am
index fb08a004b..6338e0c4e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,6 +74,7 @@ MODULES = \
guix/build-system/r.scm \
guix/build-system/ruby.scm \
guix/build-system/trivial.scm \
+ guix/build-system/ocaml.scm \
guix/ftp-client.scm \
guix/http-client.scm \
guix/gnupg.scm \
@@ -99,6 +100,7 @@ MODULES = \
guix/build/ruby-build-system.scm \
guix/build/waf-build-system.scm \
guix/build/haskell-build-system.scm \
+ guix/build/ocaml-build-system.scm \
guix/build/store-copy.scm \
guix/build/utils.scm \
guix/build/union.scm \
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index a3b9f04b9..814a2c77d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -108,7 +108,8 @@
#:use-module (guix build-system haskell)
#:use-module (guix build-system python)
#:use-module (guix build-system cmake)
- #:use-module (guix build-system trivial))
+ #:use-module (guix build-system trivial)
+ #:use-module (guix build-system ocaml))
(define-public gnubg
(package
@@ -2835,7 +2836,7 @@ auto mapper with a VT100 map display.")
(base32
"0gyrfa95l1qka7gbjf7l6mk7mbfvph00l0c995ia272qdw7rjhyf"))
(patches (search-patches "laby-make-install.patch"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(inputs
`(("lablgtk" ,lablgtk)
("ocaml" ,ocaml)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c5784db90..e1f9710e0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -30,6 +30,7 @@
#:use-module (guix svn-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system ocaml)
#:use-module (gnu packages)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gnome)
@@ -164,7 +165,7 @@ functional, imperative and object-oriented styles of programming.")
(sha256
(base32
"004gwn6rbpcb53y3rpb3v23vk39rp2xmf0liyd5iy12ij8bigrhm"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(arguments
'(;; Sometimes, 'make -jX' would fail right after ./configure with
;; "Fatal error: exception End_of_file".
@@ -225,7 +226,7 @@ Git-friendly development workflow.")
(base32
"0icdfzhsbgf89925gc8gl3fm8z2xzszzlib0v9dj5wyzkyv3a342"))
(file-name (string-append name "-" version ".tar.gz"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(native-inputs `(("ocaml" ,ocaml)
("which" ,which)))
(inputs `(("ocaml" ,ocaml)))
@@ -266,7 +267,7 @@ syntax of OCaml.")
(sha256
(base32
"1ql04iyvclpyy9805kpddc4ndjb5d0qg4shhi2fc6bixi49fvy89"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(inputs
`(("ocaml" ,ocaml)))
(arguments
@@ -307,7 +308,7 @@ concrete syntax of the language (Quotations, Syntax Extensions).")
(sha256
(base32
"14fns13wlnpiv9i05841kvi3cq4b9v2sw5x3ff6ziws28q701qnd"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(inputs
`(("ocaml" ,ocaml)))
(arguments
@@ -338,7 +339,7 @@ written in Objective Caml.")
(sha256
(base32
"0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(native-inputs
`(("texlive" ,texlive)
("findlib" ,ocaml-findlib)
@@ -392,7 +393,7 @@ It is developed using Objective Caml and Camlp5.")
(sha256
(base32
"09qb0myq66fw17v4ziz401ilsb5xlxz1nl2wsp69d0vrfy0bcrrm"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(native-inputs
`(("which" ,which)
("emacs" ,emacs-minimal)
@@ -470,7 +471,7 @@ provers.")
(sha256
(base32
"1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(inputs
`(("ocaml" ,ocaml)))
(arguments
@@ -506,7 +507,7 @@ Knuth’s LR(1) parser construction technique.")
(sha256
(base32
"0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(native-inputs
`(("camlp4" ,camlp4)
("ocaml" ,ocaml)
@@ -612,7 +613,7 @@ libpanel, librsvg and quartz.")
;; have functioning internal hyperlinks.
(substitute* "doc/Makefile"
(("hevea unison") "hevea -fix unison"))))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(outputs '("out"
"doc")) ; 1.9 MiB of documentation
(native-inputs
@@ -690,7 +691,7 @@ to the other.")
(base32
"02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
(patches (search-patches "ocaml-findlib-make-install.patch"))))
- (build-system gnu-build-system)
+ (build-system ocaml-build-system)
(native-inputs
`(("camlp4" ,camlp4)
("m4" ,m4)
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
new file mode 100644
index 000000000..74d336c3e
--- /dev/null
+++ b/guix/build-system/ocaml.scm
@@ -0,0 +1,131 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build-system ocaml)
+ #:use-module (guix store)
+ #:use-module (guix utils)
+ #:use-module (guix packages)
+ #:use-module (guix derivations)
+ #:use-module (guix search-paths)
+ #:use-module (guix build-system)
+ #:use-module (guix build-system gnu)
+ #:use-module (ice-9 match)
+ #:export (%ocaml-build-system-modules
+ ocaml-build
+ ocaml-build-system))
+
+(define %ocaml-build-system-modules
+ ;; Build-side modules imported by default.
+ `((guix build ocaml-build-system)
+ ,@%gnu-build-system-modules))
+
+(define (default-ocaml)
+ "Return the default OCaml package."
+ ;; Lazily resolve the binding to avoid a circular dependency.
+ (let ((ocaml (resolve-interface '(gnu packages ocaml))))
+ (module-ref ocaml 'ocaml)))
+
+(define* (lower name
+ #:key source inputs native-inputs outputs system target
+ (ocaml (default-ocaml))
+ #:allow-other-keys
+ #:rest arguments)
+ "Return a bag for NAME."
+ (define private-keywords
+ '(#:source #:target #:ocaml #:inputs #:native-inputs))
+
+ (and (not target) ;XXX: no cross-compilation
+ (bag
+ (name name)
+ (system system)
+ (host-inputs `(,@(if source
+ `(("source" ,source))
+ '())
+ ,@inputs
+
+ ;; Keep the standard inputs of 'gnu-build-system'.
+ ,@(standard-packages)))
+ (build-inputs `(("ocaml" ,ocaml)
+ ,@native-inputs))
+ (outputs outputs)
+ (build ocaml-build)
+ (arguments (strip-keyword-arguments private-keywords arguments)))))
+
+(define* (ocaml-build store name inputs
+ #:key
+ (test-target "check")
+ (tests? #t)
+ (phases '(@ (guix build ocaml-build-system)
+ %standard-phases))
+ (outputs '("out"))
+ (search-paths '())
+ (configure-flags ''())
+ (make-flags ''())
+ (system (%current-system))
+ (guile #f)
+ (parallel-build? #t)
+ (parallel-tests? #t)
+ (imported-modules %ocaml-build-system-modules)
+ (modules '((guix build ocaml-build-system)
+ (guix build utils))))
+ "Build SOURCE using OCAML and INPUTS."
+ (define builder
+ `(begin
+ (use-modules ,@modules)
+ (ocaml-build #:name ,name
+ #:source ,(match (assoc-ref inputs "source")
+ (((? derivation? source))
+ (derivation->output-path source))
+ ((source)
+ source)
+ (source
+ source))
+ #:system ,system
+ #:configure-flags ,configure-flags
+ #:make-flags ,make-flags
+ #:test-target ,test-target
+ #:parallel-build? ,parallel-build?
+ #:parallel-tests? ,parallel-tests?
+ #:tests? ,tests?
+ #:phases ,phases
+ #:outputs %outputs
+ #:search-paths ',(map search-path-specification->sexp
+ search-paths)
+ #:inputs %build-inputs)))
+
+ (define guile-for-build
+ (match guile
+ ((? package?)
+ (package-derivation store guile system #:graft? #f))
+ (#f
+ (let* ((distro (resolve-interface '(gnu packages commencement)))
+ (guile (module-ref distro 'guile-final)))
+ (package-derivation store guile system #:graft? #f)))))
+
+ (build-expression->derivation store name builder
+ #:inputs inputs
+ #:system system
+ #:modules imported-modules
+ #:outputs outputs
+ #:guile-for-build guile-for-build))
+
+(define ocaml-build-system
+ (build-system
+ (name 'ocaml)
+ (description "The standard OCaml build system")
+ (lower lower)))
diff --git a/guix/build/ocaml-build-system.scm b/guix/build/ocaml-build-system.scm
new file mode 100644
index 000000000..05b5cf552
--- /dev/null
+++ b/guix/build/ocaml-build-system.scm
@@ -0,0 +1,41 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build ocaml-build-system)
+ #:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module (guix build utils)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 popen)
+ #:use-module (ice-9 regex)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:export (%standard-phases
+ ocaml-build))
+
+;; Commentary:
+;;
+;; Builder-side code of the standard OCaml package build procedure.
+;;
+;; Code:
+
+(define %standard-phases
+ (modify-phases gnu:%standard-phases))
+
+(define* (ocaml-build #:key inputs (phases %standard-phases)
+ #:allow-other-keys #:rest args)
+ (apply gnu:gnu-build #:inputs inputs #:phases phases args))
--
2.11.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml).
2017-01-02 17:38 [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) David Craven
` (2 preceding siblings ...)
2017-01-02 17:38 ` [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1 David Craven
@ 2017-01-03 12:29 ` Ludovic Courtès
2017-01-03 15:27 ` Danny Milosavljevic
4 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2017-01-03 12:29 UTC (permalink / raw)
To: David Craven; +Cc: guix-devel
David Craven <david@craven.ch> skribis:
> * gnu/packages/ocaml.scm (ocaml, opam, camlp4, camlp5, hevea, coq,
> proof-general, ocaml-menhir, lablgtk, unison, ocaml-findlib)[license]:
> Add prefix.
OK!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/4] gnu: Add ocaml-zarith.
2017-01-02 17:38 ` [PATCH 2/4] gnu: Add ocaml-zarith David Craven
@ 2017-01-03 12:30 ` Ludovic Courtès
0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2017-01-03 12:30 UTC (permalink / raw)
To: David Craven; +Cc: guix-devel
David Craven <david@craven.ch> skribis:
> * gnu/packages/ocaml.scm (ocaml-zarith): New variable.
LGTM!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] gnu: Reorder imports in (gnu packages ocaml).
2017-01-02 17:38 ` [PATCH 3/4] gnu: Reorder imports in (gnu packages ocaml) David Craven
@ 2017-01-03 12:30 ` Ludovic Courtès
0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2017-01-03 12:30 UTC (permalink / raw)
To: David Craven; +Cc: guix-devel
David Craven <david@craven.ch> skribis:
> * gnu/packages/ocaml.scm: Reorder imports alphabetically.
OK!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml).
2017-01-02 17:38 [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) David Craven
` (3 preceding siblings ...)
2017-01-03 12:29 ` [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) Ludovic Courtès
@ 2017-01-03 15:27 ` Danny Milosavljevic
4 siblings, 0 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2017-01-03 15:27 UTC (permalink / raw)
To: David Craven; +Cc: guix-devel
LGTM!
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-01-03 15:27 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-02 17:38 [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) David Craven
2017-01-02 17:38 ` [PATCH 2/4] gnu: Add ocaml-zarith David Craven
2017-01-03 12:30 ` Ludovic Courtès
2017-01-02 17:38 ` [PATCH 3/4] gnu: Reorder imports in (gnu packages ocaml) David Craven
2017-01-03 12:30 ` Ludovic Courtès
2017-01-02 17:38 ` [PATCH 4/4] gnu: ocaml-findlib: Update to 1.7.1 David Craven
2017-01-02 20:51 ` Julien Lepiller
2017-01-03 11:03 ` Ben Woodcroft
2017-01-03 12:29 ` [PATCH 1/4] gnu: Use 'license:' prefix in (gnu packages ocaml) Ludovic Courtès
2017-01-03 15:27 ` Danny Milosavljevic
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).