From mboxrd@z Thu Jan 1 00:00:00 1970 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 Subject: [bug#33986] [PATCH 9/9] gnu: Add ocaml-ppxlib. References: <87lg3z8nc2.fsf@gmail.com> In-Reply-To: <87lg3z8nc2.fsf@gmail.com> Resent-Message-ID: From: Gabriel Hondet Date: Fri, 4 Jan 2019 10:09:12 +0100 Message-ID: <87a7kf8ift.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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: 33986@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * gnu/packages/ocaml.scm (ocaml-ppxlib): New variable. =2D-- 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 =2D-- 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))) =2D-=20 2.20.1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5ercJXBcjd3P1FcAMbyBBfZZ1CUFAlwwkaYACgkQMbyBBfZZ 1CU1OA/+OiENLrXVOZu5XLFoaBd9tHXVc7wDwB8WmW+YknjdaXzuX7XFBOjcVcK4 ITtNusN8oRkSlWVCwjjxtEgoVhySwWdOHX6Pxh41CzmojeMhVIzFK5/QNrnDgkOO CNH8TY2qYTnerXy5i2YsOO3IFXLZS05ovYvpnDJgqVN/v81qZRLwlbOrcMhE/fMh dFgd1R4ZFvCVgqLD9aWg8Bn+slTXL8gt24jAuDifRRxDQnDcWQp02ZV+TTlolwEo DH3395c4o7PGgP8OdJ500+Y248TxFtvdxIvmMpQEGs95ivSSWbcZCWbZcNrNun87 yPU5AWMC4GOONtAfmsxupWT+hr0+mA6Dewcy09XinIxrDoWrgUWc/OnQsbYpvxYI awniHZGBL6zTTcgmKxHJhVttQQsvNy05UIyEKC9dk2OsH4yNVeGMJBYm9o6aQ174 dYJQ0YhpnMulQrTNElojEnP8IPSuv1QKgdKmrk+0ClXvxIqjwwjcJ3nxMLL4jjrT EYfn70r0859xIReYfVZjCqQ1rViLhDV64dRMZU5j8XHZBVYoaS6KuLw6ZhPOB01/ eANfJnrHv1LWvLtpEoj/GOXLICnFQGsD4ZUkHKVKP564ZrMEU+bjIUG4r6z+sXF/ RSIV6So5goKHT80S4wtY1zErx2W8hpJF1xw62a0vqCFbDRlAzeQ= =aK02 -----END PGP SIGNATURE----- --=-=-=--