diff mbox

[9/9] gnu: Add ocaml-menhir.

Message ID 20161203104213.8135-9-david@craven.ch
State New
Headers show

Commit Message

David Craven Dec. 3, 2016, 10:42 a.m. UTC
* gnu/packages/ocaml.scm (ocaml-menhir): New variable.
---
 gnu/packages/ocaml.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

Leo Famulari Dec. 3, 2016, 7:56 p.m. UTC | #1
On Sat, Dec 03, 2016 at 11:42:13AM +0100, David Craven wrote:
> * gnu/packages/ocaml.scm (ocaml-menhir): New variable.

> +    (synopsis "Parser generator")
> +    (description "")

This description is a bit too short ;)

> +    (license #f)))

According the the 'LICENSE' file, it appears to use GPL2 (I didn't check
for "or later) for the library, and the Q Public License for the
"generator".
Leo Famulari Dec. 3, 2016, 8:12 p.m. UTC | #2
On Sat, Dec 03, 2016 at 11:42:13AM +0100, David Craven wrote:
> * gnu/packages/ocaml.scm (ocaml-menhir): New variable.

> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'configure
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out")))
> +               (setenv "PREFIX" out))
> +             #t)))))

This is skipping the configure phase and reusing it to set the PREFIX
variable, right?

If so, I think it's better to delete the configure phase and set the
variable in its own set-env phase, or with #:configure-flags or
#:make-flags (if they are respected by this build system).
diff mbox

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b9b3d4a..e93e730 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -456,6 +456,36 @@  assistant to write formal mathematical proofs using a variety of theorem
 provers.")
     (license gpl2+)))
 
+(define-public ocaml-menhir
+  (package
+    (name "ocaml-menhir")
+    (version "20161115")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://gallium.inria.fr/~fpottier/menhir/"
+                    "menhir-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("ocaml" ,ocaml)))
+    (arguments
+     `(#:parallel-build? #f ; Parallel build causes failure
+       #:tests? #f ; No check target
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "PREFIX" out))
+             #t)))))
+    (home-page "http://gallium.inria.fr/~fpottier/menhir")
+    (synopsis "Parser generator")
+    (description "")
+    (license #f)))
+
 (define-public lablgtk
   (package
     (name "lablgtk")