From patchwork Fri Jan 4 09:09:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Hondet X-Patchwork-Id: 674 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 37C0D16A0B; Sat, 5 Jan 2019 11:15:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from listsout.gnu.org (listsout.gnu.org [208.118.235.17]) by mira.cbaines.net (Postfix) with ESMTP id C1E03169C4 for ; Sat, 5 Jan 2019 11:15:16 +0000 (GMT) Received: from localhost ([127.0.0.1]:53484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfjvA-0005aG-Bn for patchwork@mira.cbaines.net; Sat, 05 Jan 2019 06:15:16 -0500 Received: from eggsout.gnu.org ([209.51.188.92]:43544 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfjv0-0005VT-O4 for guix-patches@gnu.org; Sat, 05 Jan 2019 06:15:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfjux-0004vM-HW for guix-patches@gnu.org; Sat, 05 Jan 2019 06:15:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:57287) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfjux-0004uj-9o for guix-patches@gnu.org; Sat, 05 Jan 2019 06:15:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gfjuw-0006nB-8N for guix-patches@gnu.org; Sat, 05 Jan 2019 06:15:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33986] [PATCH 9/9] gnu: Add ocaml-ppxlib. References: <87lg3z8nc2.fsf@gmail.com> In-Reply-To: <87lg3z8nc2.fsf@gmail.com> Resent-From: Gabriel Hondet Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Jan 2019 11:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33986 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33986@debbugs.gnu.org Received: via spool by 33986-submit@debbugs.gnu.org id=B33986.154668689626070 (code B ref 33986); Sat, 05 Jan 2019 11:15:02 +0000 Received: (at 33986) by debbugs.gnu.org; 5 Jan 2019 11:14:56 +0000 Received: from localhost ([127.0.0.1]:47300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfjup-0006mQ-JX for submit@debbugs.gnu.org; Sat, 05 Jan 2019 06:14:55 -0500 Received: from mail-ed1-f46.google.com ([209.85.208.46]:36782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfjun-0006mD-6O for 33986@debbugs.gnu.org; Sat, 05 Jan 2019 06:14:53 -0500 Received: by mail-ed1-f46.google.com with SMTP id f23so33867782edb.3 for <33986@debbugs.gnu.org>; Sat, 05 Jan 2019 03:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=DpplMt3K+I7nzF/7lybUhw3ycJOei9k962+tmZzrRkM=; b=lliFER9hBvqT8Aqg9GMfBlwHo/U8wo66a4xLIvpUtaEswwM13//m/IIL1LNtHGrWkD tt1FUc2zytmv+wNem2vmDo5/iEEcaE2rjX54gt5L/lJtWzVhyshUA7J2f+041oyR9WO+ p8wh2GVTALF6P0qAXFPViDzNJQAUez8if2/0TCyTs/pBoxHTz6dmQucPmw6zXxrVZT+O jsqkjBsOUKxfAdaHaYjZJEB6EYta11hLVK7xHbC+DqAhH3cBNiqggUw8aIeenl6XQulO OgHLlHUpVL5K8NPm07TEXGRBaSDrkbwH7Lkc5iPeqrNPX1aNxpu/NUpoiJw09O9qMWAU w1rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=DpplMt3K+I7nzF/7lybUhw3ycJOei9k962+tmZzrRkM=; b=uW/XpvDkvNhhAdEsnKe4r1xX23mUNLRj6bVcER1UVkV92mi7aX92uq21ziDxpvnYos MJk8CQ2JsLTak4UhNLv5qnAj3muXZOEb/CseJgTIjoWzTV1Z+6nF+dsqzLkHFeE67v0t mgeC4uyj2rteXnR72u1fLCcq6l53nlO1rR1h608tJ9DjiKBdsP+PncNb7BoC1iOuUWIk sZg5fDnc8lUANPQ76ataYeF/nSsonHUKd17TiMlQLUXkdMetzbJD9Ei4KlJ7IlShAcjc Y27BSYmq7r4YKvV184pNMUgKl8B5tJtjeg1aQReCeks4VKtuZGlXkfSs1Srw0LuuWbh5 BQGQ== X-Gm-Message-State: AA+aEWYL/skKGxigFHY5LCj/G73GV4E0glTMWwOldhhlhhQNLGMJk4Fo ZYowf6hbXCOgHS/bjQo4xclnqjLV X-Google-Smtp-Source: AFSGD/XEQaag7Yw4JEzjhl1NEH3z86DbVrOQb9bxGTYcIKAoIjHchiWbGO1spVc8N8GYcX8HEujjfg== X-Received: by 2002:a17:906:b7d1:: with SMTP id fy17-v6mr41297684ejb.70.1546686887214; Sat, 05 Jan 2019 03:14:47 -0800 (PST) Received: from glht-x240.gmail.com (2a01cb04062c860044e3e8429e102378.ipv6.abo.wanadoo.fr. [2a01:cb04:62c:8600:44e3:e842:9e10:2378]) by smtp.gmail.com with ESMTPSA id e35sm26781465eda.13.2019.01.05.03.14.46 for <33986@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Jan 2019 03:14:46 -0800 (PST) User-agent: mu4e 1.0; emacs 26.1 From: Gabriel Hondet Date: Fri, 4 Jan 2019 10:09:12 +0100 Message-ID: <87a7kf8ift.fsf@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ocaml.scm (ocaml-ppxlib): New variable. --- gnu/packages/ocaml.scm | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 3607dc319..70dcf1bd7 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5354,3 +5354,69 @@ libraries using a more consistent API.") ppx_deriving and ppx_type_conv to inter-operate gracefully when linked as part of the same ocaml-migrate-parsetree driver.") (license license:bsd-3))) + +(define-public ocaml-ppxlib + (package + (name "ocaml-ppxlib") + (version "0.4.0") + (home-page "https://github.com/ocaml-ppx/ppxlib") + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append home-page ".git")) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1nr4igf5m4prvigvv470dnhfdhdw0p6hz6zw8gnm5bzcv7s2lg5l")))) + (build-system dune-build-system) + (inputs + `(("ocaml-base" ,ocaml-base) + ("ocaml-compiler-libs" ,ocaml-compiler-libs) + ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree) + ("ocaml-ppx-derivers" ,ocaml-ppx-derivers) + ("ocaml-stdio" ,ocaml-stdio) + ("ocaml-result" ,ocaml-result) + ("ocaml-sexplib0" ,ocaml-sexplib0))) + (native-inputs + `(("ocaml-findlib" ,ocaml-findlib))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'check 'set-topfind + (lambda* (#:key inputs #:allow-other-keys) + ;; add the line #directory ".." at the top of each file + ;; using #use "topfind";; to be able to find topfind + (let* ((findlib-path (assoc-ref inputs "ocaml-findlib")) + (findlib-libdir + (string-append findlib-path "/lib/ocaml/site-lib"))) + (substitute* '("test/base/test.ml" + "test/deriving/test.ml" + "test/driver/attributes/test.ml" + "test/driver/non-compressible-suffix/test.ml" + "test/driver/transformations/test.ml") + (("#use \"topfind\";;" all) + (string-append "#directory \"" findlib-libdir "\"\n" + all)))) + #t))))) + (synopsis + "Base library and tools for ppx rewriters") + (description + "A comprehensive toolbox for ppx development. It features: +@itemize +@item +a OCaml AST / parser / pretty-printer snapshot, to create a full frontend +independent of the version of OCaml; +@item +a library for library for ppx rewriters in general, and type-driven code +generators in particular; +@item +a feature-full driver for OCaml AST transformers; +@item +a quotation mechanism allowing to write values representing the +OCaml AST in the OCaml syntax; +@item +a generator of open recursion classes from type definitions. +@end itemize") + (license license:expat)))