guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/4] gnu: Add ocaml-zarith.


From: David Craven
Subject: [PATCH 2/4] gnu: Add ocaml-zarith.
Date: Mon, 2 Jan 2017 18:38:12 +0100

* 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 <address@hidden>
 ;;; Copyright © 2016 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 Julien Lepiller <address@hidden>
+;;; Copyright © 2016 David Craven <address@hidden>
 ;;;
 ;;; 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]