>From 5497df789597bedb3744af4d11d927a99dea229e Mon Sep 17 00:00:00 2001 From: Ben Woodcroft
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 +;;; +;;; 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