From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gGg0C17/+l/8IwAA0tVLHw (envelope-from ) for ; Sun, 10 Jan 2021 13:21:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CFz+Bl7/+l9oVAAAB5/wlQ (envelope-from ) for ; Sun, 10 Jan 2021 13:21:34 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EE5799404E7 for ; Sun, 10 Jan 2021 13:21:31 +0000 (UTC) Received: from localhost ([::1]:54852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyaew-0005SB-SG for larch@yhetil.org; Sun, 10 Jan 2021 08:21:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyZyv-0004vh-QE for guix-patches@gnu.org; Sun, 10 Jan 2021 07:38:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyZyt-0005KM-BW for guix-patches@gnu.org; Sun, 10 Jan 2021 07:38:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kyZyt-0001Jz-9b for guix-patches@gnu.org; Sun, 10 Jan 2021 07:38:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45762] [PATCH] ocaml: Add ocaml-down and ocaml-ocp-index Resent-From: aecepoglu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Jan 2021 12:38:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45762 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45762@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16102822234961 (code B ref -1); Sun, 10 Jan 2021 12:38:03 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jan 2021 12:37:03 +0000 Received: from localhost ([127.0.0.1]:53330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyZxu-0001Hq-TK for submit@debbugs.gnu.org; Sun, 10 Jan 2021 07:37:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:48628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyYG3-0004HO-7O for submit@debbugs.gnu.org; Sun, 10 Jan 2021 05:47:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyYG3-00033v-0N for guix-patches@gnu.org; Sun, 10 Jan 2021 05:47:39 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyYG0-0000Pz-2x for guix-patches@gnu.org; Sun, 10 Jan 2021 05:47:38 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D052B5C00A5 for ; Sun, 10 Jan 2021 05:47:32 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 10 Jan 2021 05:47:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= date:from:to:subject:message-id:mime-version:content-type; s= fm2; bh=lCP8TiSSdSvlB8xzGhdK86pVZJz73nF9kqUVfLA1hUQ=; b=CqsoLT96 G8OkLFgjbD2wgBMlJ+vQHMZxYu/vqFGOlldMZDBWy/XopwX345AsnYEE40t+8YMT bV3pONtav4fnoSFu6LcPQMoCoLk3gXF82XSs769Pqv1cMlwmBQx3uPEqPP/LL3YB 1Vi8Gx9EO5UnlfkUGNZeDVWOxawVPvAljmMJ2AZQBn0NtfvMbyAt6o6DYhb0AJW4 we5/t5ry2E0zFKslvb0PCgTsUqGoodkrjvj0s0wgsKv5wM31FOraBR4V9LIw2aOb e5+q/RPfyFGOzM9FJHRzdbEwAYjrjUEjKyJl7dxk+JRn1xBmV+6Kwo3zW1yPSdj+ OjsBqibZK8YD/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=lCP8TiSSdSvlB8xzGhdK86pVZJz73 nF9kqUVfLA1hUQ=; b=mqG3cVowEySJ8ijzo3FO6y9ZsDwzxRoqrwoPfU1OEPiS5 zbV8yC/Sh65Ncfye8nWrOshDqwDMAbssUZc8c62ESLHUPKkgMo/EHt5DQpYR0j8Z vperiowytnh3tY0V/BCQMgc3at/Zx6G8kik7gRXiWh2u50OvCWSdrYVX7sKb+ebh 8HSLiEtQ+K6NQt1WIUHHJ8s3h0BcAy5p+/7RX6+MlDqTmG0H59/TuzaBZaaUrm1F l/Txm07oghgQmP5SnLUr4Rcj2Ak6y/gj3syk2f8/s05xlKqQtPKsfDNrkNprZgd5 PbeyeFqZ2SHLrqYnSANrv1MIEtLs5R/8IMXAFRbZA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdegledgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesthdtredttd dtvdenucfhrhhomheprggvtggvphhoghhluhcuoegrvggtvghpohhglhhusehfrghsthhm rghilhdrfhhmqeenucggtffrrghtthgvrhhnpeegheeuteektdekleeuffeiffefffeuie fhvdelkedtteevgeeijeevhfefieegjeenucffohhmrghinhepvghrrhgrthhiqhhuvgdr tghhpdhgihhthhhusgdrtghomhdpthihphgvrhgvgidrohhrghenucfkphepudejiedrge durddvledrudektdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegrvggtvghpohhglhhusehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: from localhost (unknown [176.41.29.180]) by mail.messagingengine.com (Postfix) with ESMTPA id 5557C108005F for ; Sun, 10 Jan 2021 05:47:32 -0500 (EST) Date: Sun, 10 Jan 2021 13:49:15 +0300 From: aecepoglu Message-ID: <20210110104915.2t6u4atuikypepfw@minitower> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=66.111.4.28; envelope-from=aecepoglu@fastmail.fm; helo=out4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 10 Jan 2021 07:37:00 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 10 Jan 2021 08:20:52 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.75 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=fastmail.fm header.s=fm2 header.b=CqsoLT96; dkim=fail (headers rsa verify failed) header.d=messagingengine.com header.s=fm1 header.b=mqG3cVow; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.fm (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: EE5799404E7 X-Spam-Score: -0.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: rcaDYWwL1DtL --- gnu/packages/ocaml.scm | 132 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 2df16e7cd2..6699eb1050 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -390,6 +390,71 @@ repository-wide uninstallability checks.") ;; with static-linking exception (license license:lgpl2.1+))) +(define-public ocaml-down + (package + (name "ocaml-down") + (version "0.0.3") + (source + (origin + (method url-fetch) + (uri "https://erratique.ch/software/down/releases/down-0.0.3.tbz") + (sha256 + (base32 + "1nz2f5j17frgr2vrslcz9klmi6w9sm2vqwwwpi33ngcm3rgmsrlg")))) + (build-system ocaml-build-system) + (arguments + `(#:tests? #f + #:phases (modify-phases %standard-phases + (delete 'configure)) + #:build-flags (list "build" + "--lib-dir" (string-append (assoc-ref %outputs "out") + "/lib/ocaml/site-lib")))) + (native-inputs + `(("ocaml-findlib" ,ocaml-findlib) + ("ocamlbuild" ,ocamlbuild) + ("ocaml-topkg" ,ocaml-topkg) + ("opam" ,opam))) + (home-page "https://erratique.ch/software/down") + (synopsis "An OCaml toplevel (REPL) upgrade") + (description + " +Down is an unintrusive user experience upgrade for the `ocaml` +toplevel (REPL). + +Simply load the zero dependency `Down` library in the `ocaml` toplevel +and you get line edition, history, session support and identifier +completion and documentation (courtesy of [`ocp-index`][ocp-index]). + +Add this to your `~/.ocamlinit`: + + #use \"down.top\" + +You may also need to add this to your `~/.ocamlinit` and declare +the environment variable OCAML_TOPLEVEL_PATH + + let () = + try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\") + with Not_found -> () + +OR + + let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\") + |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\") + |> List.map (fun x -> x ^ \"/toplevel\") + (* remove the line below if you don't want to see the text + every time you start the toplevel *) + |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x) + |> List.iter Topdirs.dir_directory;; + + +![tty](doc/tty.png) + +Down is distributed under the ISC license. + + +[ocp-index]: https://github.com/OCamlPro/ocp-index") + (license license:isc))) + (define-public ocaml-opam-file-format (package (name "ocaml-opam-file-format") @@ -2363,6 +2428,73 @@ the JSON data format. It can process JSON text without blocking on IO and without a complete in-memory representation of the data.") (license license:isc))) +(define-public ocaml-ocp-indent + (package + (name "ocaml-ocp-indent") + (version "1.8.1") + (source + (origin + (method url-fetch) + (uri "https://github.com/OCamlPro/ocp-indent/archive/1.8.1.tar.gz") + (sha256 + (base32 + "0rqcvwzpwwzwqvrzg1l37jjiglrk2ijgjg1c7vy3xvc8lk9zyysw")))) + (build-system dune-build-system) + (arguments + `(#:tests? #f + #:build-flags (list "--profile=release"))) + (propagated-inputs + `(("ocaml-cmdliner" ,ocaml-cmdliner))) + (home-page + "http://www.typerex.org/ocp-indent.html") + (synopsis + "A simple tool to indent OCaml programs") + (description + "Ocp-indent is based on an approximate, tolerant OCaml parser and a simple stack +machine ; this is much faster and more reliable than using regexps. Presets and +configuration options available, with the possibility to set them project-wide. +Supports most common syntax extensions, and extensible for others. + +Includes: +- An indentor program, callable from the command-line or from within editors +- Bindings for popular editors +- A library that can be directly used by editor writers, or just for\n fault-tolerant/approximate parsing. +") + (license #f))) + +(define-public ocaml-ocp-index + (package + (name "ocaml-ocp-index") + (version "1.2.1") + (source + (origin + (method url-fetch) + (uri "https://github.com/OCamlPro/ocp-index/archive/1.2.1.tar.gz") + (sha256 + (base32 + "169msb3k1ip5lp79lr62nsk715rwrn53x9jcrnxz4js7c0fv0cyr")))) + (build-system dune-build-system) + (arguments + `(#:package "ocp-index")) + (propagated-inputs + `(("ocaml-ocp-indent" ,ocaml-ocp-indent) + ("ocaml-re" ,ocaml-re) + ("ocaml-cmdliner" ,ocaml-cmdliner))) + (native-inputs `(("ocaml-cppo" ,ocaml-cppo))) + (home-page + "http://www.typerex.org/ocp-index.html") + (synopsis + "Lightweight completion and documentation browsing for OCaml libraries") + (description + "This package includes +* The `ocp-index` library and command-line tool +* `ocp-grep`, a tool that finds uses of a given (qualified) identifier in a source tree +* bindings for emacs and vim (sublime text also [available](https://github.com/whitequark/sublime-ocp-index/)) + +To automatically configure your editors, install this with package `user-setup`. +") + (license #f))) + (define-public ocaml-ocurl (package (name "ocaml-ocurl") -- 2.29.2