From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: [PATCH 05/10] gnu: Add ocaml-pcre. Date: Wed, 18 Jan 2017 21:27:57 +0100 Message-ID: <20170118202802.5073-6-julien@lepiller.eu> References: <20170118202802.5073-1-julien@lepiller.eu> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTwqO-0005oJ-OD for guix-devel@gnu.org; Wed, 18 Jan 2017 15:28:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTwqO-00009g-8z for guix-devel@gnu.org; Wed, 18 Jan 2017 15:28:33 -0500 Received: from dau94-h03-89-91-205-84.dsl.sta.abo.bbox.fr ([89.91.205.84]:39607 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 1cTwqN-00007o-T6 for guix-devel@gnu.org; Wed, 18 Jan 2017 15:28:32 -0500 Received: from localhost (localhost [127.0.0.1]) by skaro.lepiller.eu (Postfix) with ESMTP id 2B8B07FCD1 for ; Wed, 18 Jan 2017 21:28:29 +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 8ux4qu86YZOd for ; Wed, 18 Jan 2017 21:28:23 +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 7032180246 for ; Wed, 18 Jan 2017 21:28:12 +0100 (CET) In-Reply-To: <20170118202802.5073-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 bc4193ac6..4fbb75c24 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) @@ -1822,3 +1823,38 @@ tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.") 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