From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: [PATCH 05/10] gnu: Add ocaml-pcre. Date: Fri, 27 Jan 2017 23:12:23 +0100 Message-ID: <20170127221228.4370-6-julien@lepiller.eu> References: <20170127221228.4370-1-julien@lepiller.eu> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXElM-0000kA-UY for guix-devel@gnu.org; Fri, 27 Jan 2017 17:12:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXElL-0004V3-0p for guix-devel@gnu.org; Fri, 27 Jan 2017 17:12:56 -0500 Received: from dau94-h03-89-91-205-84.dsl.sta.abo.bbox.fr ([89.91.205.84]:33178 helo=skaro.lepiller.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cXElK-0004US-OH for guix-devel@gnu.org; Fri, 27 Jan 2017 17:12:54 -0500 Received: from localhost (localhost [127.0.0.1]) by skaro.lepiller.eu (Postfix) with ESMTP id CF39680B05 for ; Fri, 27 Jan 2017 23:12:52 +0100 (CET) Received: from skaro.lepiller.eu ([127.0.0.1]) by localhost (lepiller.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EQ5qJtawcvu6 for ; Fri, 27 Jan 2017 23:12:48 +0100 (CET) Received: from localhost.localdomain (128-79-116-134.hfc.dyn.abo.bbox.fr [128.79.116.134]) by skaro.lepiller.eu (Postfix) with ESMTPSA id 2A355811C3 for ; Fri, 27 Jan 2017 23:12:37 +0100 (CET) In-Reply-To: <20170127221228.4370-1-julien@lepiller.eu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/ocaml.scm (ocaml-pcre): New variable. --- gnu/packages/ocaml.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 9043c1464..66e0a2a0d 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -40,6 +40,7 @@ #:use-module (gnu packages m4) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) + #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -1825,3 +1826,38 @@ many additional enhancements, including: every compliant installation of OCaml and organize these libraries into a hierarchy of modules.") (license license:lgpl2.1+))) + +(define-public ocaml-pcre + (package + (name "ocaml-pcre") + (version "7.2.3") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/mmottl/pcre-ocaml/archive" + "/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3")))) + (build-system ocaml-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'link-lib + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (stubs (string-append out "/lib/ocaml/site-lib/stubslibs")) + (lib (string-append out "/lib/ocaml/site-lib/pcre"))) + (mkdir-p stubs) + (symlink (string-append lib "/dllpcre_stubs.so") + (string-append stubs "/dllpcre_stubs.so")))))))) + (native-inputs + `(("batteries" ,ocaml-batteries) + ("pcre:bin" ,pcre "bin"))) + (propagated-inputs `(("pcre" ,pcre))) + (home-page "https://mmottl.github.io/pcre-ocaml") + (synopsis "Bindings to the Perl Compatibility Regular Expressions library") + (description "Pcre-ocaml offers library functions for string pattern +matching and substitution, similar to the functionality offered by the Perl +language.") + (license license:lgpl2.1))); with an exception -- 2.11.0