From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCsY5-00078i-IL for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCsY3-0003BO-VT for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51558) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCsY3-0003BH-RS for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCsY3-0006tZ-OZ for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:07 -0400 Subject: [bug#33079] [PATCH 11/34] gnu: Add ocaml-num. Resent-Message-ID: From: Julien Lepiller Date: Wed, 17 Oct 2018 22:34:19 +0200 Message-Id: <20181017203442.7075-11-julien@lepiller.eu> In-Reply-To: <20181017203442.7075-1-julien@lepiller.eu> References: <20181017223130.775b25fc@lepiller.eu> <20181017203442.7075-1-julien@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33079@debbugs.gnu.org * gnu/packages/ocaml.scm (ocaml-num): New variable. --- gnu/packages/ocaml.scm | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 6a32d225c..604726c7b 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -556,6 +556,50 @@ concrete syntax of the language (Quotations, Syntax Extensions).") written in Objective Caml.") (license license:qpl))) +(define-public ocaml-num + (package + (name "ocaml-num") + (version "1.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml/num/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1xlkd0svc0mgq5s7nrm2rjrsvg15i9wxqkc1kvwjp6sv8vv8bb04")))) + (build-system ocaml-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'fix-makefile + (lambda* (#:key outputs #:allow-other-keys) + ;; This package supposes we install to the same directory as + ;; the ocaml package. + (substitute* "src/META" + (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out") + "/lib/ocaml/site-lib\""))) + (substitute* "src/Makefile" + (("\\) \\$\\(STDLIBDIR\\)") + (string-append ") " (assoc-ref outputs "out") + "/lib/ocaml/site-lib"))) + #t)) + (add-after 'install 'fix-stubslib + (lambda* (#:key outputs #:allow-other-keys) + (format #t "~a~%" (find-files "." ".*.so")) + (let ((stubdir (string-append (assoc-ref outputs "out") + "/lib/ocaml/site-lib"))) + (mkdir-p stubdir) + (install-file "src/dllnums.so" stubdir)) + #t))))) + (home-page "https://github.com/ocaml/num") + (synopsis "Arbitrary-precision integer and rational arithmetic") + (description "OCaml-Num contains the legacy Num library for +arbitrary-precision integer and rational arithmetic that used to be part of +the OCaml core distribution.") + (license license:lgpl2.1+))); with linking exception + (define-public coq (package (name "coq") -- 2.18.0