From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SCWzB71r/F+oGgAA0tVLHw (envelope-from ) for ; Mon, 11 Jan 2021 15:16:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MBOlA71r/F9ofgAA1q6Kng (envelope-from ) for ; Mon, 11 Jan 2021 15:16:13 +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 48B6B9403CB for ; Mon, 11 Jan 2021 15:16:12 +0000 (UTC) Received: from localhost ([::1]:49648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyyvT-0007Kn-8l for larch@yhetil.org; Mon, 11 Jan 2021 10:16:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyyvK-0007Jz-Jk for guix-patches@gnu.org; Mon, 11 Jan 2021 10:16:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyyvK-0003W3-Cs for guix-patches@gnu.org; Mon, 11 Jan 2021 10:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kyyvK-00073M-8N for guix-patches@gnu.org; Mon, 11 Jan 2021 10:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45762] [PATCH] ocaml: Add ocaml-down and ocaml-ocp-index Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Jan 2021 15:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45762 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: aecepoglu Received: via spool by 45762-submit@debbugs.gnu.org id=B45762.161037812827060 (code B ref 45762); Mon, 11 Jan 2021 15:16:02 +0000 Received: (at 45762) by debbugs.gnu.org; 11 Jan 2021 15:15:28 +0000 Received: from localhost ([127.0.0.1]:57811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyum-00072N-7a for submit@debbugs.gnu.org; Mon, 11 Jan 2021 10:15:28 -0500 Received: from lepiller.eu ([89.234.186.109]:59766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyyuj-00072E-P9 for 45762@debbugs.gnu.org; Mon, 11 Jan 2021 10:15:27 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id e3b0aac6; Mon, 11 Jan 2021 15:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=pm+4qZ8AoB00 ktZZFD4syo8BlraljP1+ymoaXteYYbU=; b=O/IMCUI/CthJvwkzniDXkmnt/Ouw JnxsGj8E6WDDhPVI/uaT3QEsxHFonFdBljJxXJKuNrzNLgRsRCsYFNKt2Ptvm60k yfrKZnu83tbxg3AkU8o3OjbPZHWl+OG1C20f4edOwBTEu0hZurYCYfvr+9/rHdzQ ZopXd9oS9dx79/BxVljoW9l8kgcEgwFaEJ6pz5QBjcML/MBkca7DB76u2wWww7D6 vummZF/n6S6N6GiqygZeR5/tOZKn5KxoEYVQcmtRbWPC78ALzG1NaPamk+eo6dtG 89cZzJGCmzBJTN5GaEINK2MRQnvKocz8m+0XqC+eMC9rCDFGNqd7nCwfRA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id a89df6d1 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 11 Jan 2021 15:15:23 +0000 (UTC) Date: Mon, 11 Jan 2021 16:15:14 +0100 From: Julien Lepiller Message-ID: <20210111161514.18648234@tachikoma.lepiller.eu> In-Reply-To: <20210110104915.2t6u4atuikypepfw@minitower> References: <20210110104915.2t6u4atuikypepfw@minitower> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45762@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.25 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=lepiller.eu header.s=dkim header.b=O/IMCUI/; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (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: 48B6B9403CB X-Spam-Score: -1.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: YNSN9pSZvr8Q Hi, thanks for the patch! Since it adds three packages, could you make this a series of three patches, where each adds just one package? First, ocp-indent, then ocp-index and finally down. Below are remarks that you should address in these patches too :) For each of them, the title of the patch should be "gnu: Add .", followed by a blank line and "* gnu/packages/ocaml.scm (): New variable.". Le Sun, 10 Jan 2021 13:49:15 +0300, aecepoglu a =C3=A9crit : > --- > gnu/packages/ocaml.scm | 132 > +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 > insertions(+) >=20 > 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+))) In the first patch of the series, could you add a copyright line for yourself? It's fine to use a pseudonym if you don't want to use your legal name. > =20 > +(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 Please add a comment explaining why you skip tests (could be "no tests" if there is no tests) :) > + #:phases (modify-phases %standard-phases > + (delete 'configure)) > + #:build-flags (list "build" > + "--lib-dir" (string-append (assoc-ref > %outputs "out") > + > "/lib/ocaml/site-lib")))) I think the indentation is off here, but I'll fix it, don't worry. > + (native-inputs > + `(("ocaml-findlib" ,ocaml-findlib) > + ("ocamlbuild" ,ocamlbuild) > + ("ocaml-topkg" ,ocaml-topkg) > + ("opam" ,opam))) Same here, there's one space too much below native-inputs. > + (home-page "https://erratique.ch/software/down") > + (synopsis "An OCaml toplevel (REPL) upgrade") Synpsis and description should not start with an article, so make it "OCaml toplevel (REPL) upgrade" :) > + (description > + " > +Down is an unintrusive user experience upgrade for the `ocaml` > +toplevel (REPL).=20 > + > +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 () =3D > + try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\") > + with Not_found -> () > + > +OR > + =20 > + let () =3D 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))) > + I supposed you used the description from the opam importer? It doesn't use the same syntax as guix, so you have to translate them usually. Don't worry too much though if you can't make it, I'll take care of it when applying your patch :) Basically, don't start with a new line, links are not supported, and generally use texinfo syntax. > (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))) > =20 > +(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 Same question, why disable tests? > + #:build-flags (list "--profile=3Drelease"))) Unless there's a specific reason, I think #:package the usual way to do it. > + (propagated-inputs > + `(("ocaml-cmdliner" ,ocaml-cmdliner))) > + (home-page > + "http://www.typerex.org/ocp-indent.html") > + (synopsis > + "A simple tool to indent OCaml programs") Remove the article, so "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. +") Sorry, my client is making a mess out of this. I'll make sure it looks alright, don't worry about it. > + (license #f))) Can you check the license and fill in the field please? #f is not acceptable in Guix :) > + > +(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`. +") My client is again making a mess out of this, but I'll fix this anyway, don't worry. > + (license #f))) Same, please specify the license. > + > (define-public ocaml-ocurl > (package > (name "ocaml-ocurl") Overall great contribution! Thank you again!