unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Gabriel Hondet <gabrielhondet@gmail.com>
To: 33986@debbugs.gnu.org
Subject: [bug#33986] [PATCH 9/9] gnu: Add ocaml-ppxlib.
Date: Fri, 4 Jan 2019 10:09:12 +0100	[thread overview]
Message-ID: <87a7kf8ift.fsf@gmail.com> (raw)
In-Reply-To: <87lg3z8nc2.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3189 bytes --]

* 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)))
-- 
2.20.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2019-01-05 11:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03  7:18 [bug#33986] [PATCH 1/9] gnu: Add ocaml-sexplib0 Gabriel Hondet
2019-01-03  7:26 ` [bug#33986] [PATCH 2/9] gnu: Add ocaml-parsexp Gabriel Hondet
2019-01-03  7:45 ` [bug#33986] [PATCH 3/9] gnu: Add ocaml-sexplib Gabriel Hondet
2019-01-03  8:43 ` [bug#33986] [PATCH 4/9] gnu: Add ocaml-base Gabriel Hondet
2019-01-03  9:13 ` [bug#33986] [PATCH 5/9] gnu: Add ocaml-compiler-libs Gabriel Hondet
2019-01-03  9:40 ` [bug#33986] [PATCH 6/9] gnu: Add ocaml-migrate-parsetree Gabriel Hondet
2019-01-03  9:48 ` [bug#33986] [PATCH 7/9] gnu: Add ocaml-stdio Gabriel Hondet
2019-01-03  9:59 ` [bug#33986] [PATCH 8/9] gnu: Add ocaml-ppx-derivers Gabriel Hondet
2019-01-04  9:09 ` Gabriel Hondet [this message]
2019-01-05 13:22 ` [bug#33986] [PATCH 1/9] gnu: Add ocaml-sexplib0 Julien Lepiller
2019-01-05 16:36   ` Gabriel Hondet
2019-01-05 16:38   ` [bug#33986] [PATCH 5/9] " Gabriel Hondet
2019-01-05 16:39   ` [bug#33986] [PATCH 7/9] " Gabriel Hondet
2019-01-05 16:44   ` [bug#33986] [PATCH 8/9] gnu: Add ocaml-ppx-derivers Gabriel Hondet
2019-01-16 19:11 ` bug#33986: [PATCH 1/9] gnu: Add ocaml-sexplib0 Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7kf8ift.fsf@gmail.com \
    --to=gabrielhondet@gmail.com \
    --cc=33986@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).