all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: aecepoglu <aecepoglu@fastmail.fm>
To: 45762@debbugs.gnu.org
Subject: [bug#45762] [PATCH 3/3] ocaml: Add ocaml-down * gnu/packages/ocaml.scm (ocaml-down): New variable.
Date: Mon, 11 Jan 2021 23:56:10 +0300	[thread overview]
Message-ID: <20210111205610.vnimx34apdkdqwvd@minitower> (raw)
In-Reply-To: <20210110104915.2t6u4atuikypepfw@minitower>

---
 gnu/packages/ocaml.scm | 56 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 00978fa138..300bfceadd 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -391,6 +391,62 @@ 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 ;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"))))
+    (native-inputs
+     `(("ocaml-findlib" ,ocaml-findlib)
+       ("ocamlbuild" ,ocamlbuild)
+       ("ocaml-topkg" ,ocaml-topkg)
+       ("opam" ,opam)))
+    (home-page "https://erratique.ch/software/down")
+    (synopsis "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 `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;;")
+    (license license:isc)))
+
 (define-public ocaml-opam-file-format
   (package
     (name "ocaml-opam-file-format")
-- 
2.29.2





  parent reply	other threads:[~2021-01-11 20:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 10:49 [bug#45762] [PATCH] ocaml: Add ocaml-down and ocaml-ocp-index aecepoglu
2021-01-11 14:57 ` zimoun
2021-01-11 15:15 ` Julien Lepiller
2021-01-11 20:55 ` [bug#45762] [PATCH 1/3] ocaml: Add ocaml-ocp-indent * gnu/packages/ocaml.scm (ocaml-ocp-indent): New variable aecepoglu
2021-01-11 20:55 ` [bug#45762] [PATCH 2/3] ocaml: Add ocaml-ocp-index * gnu/packages/ocaml.scm (ocaml-ocp-index): " aecepoglu
2021-01-11 20:56 ` aecepoglu [this message]
2021-01-12 14:10 ` bug#45762: [PATCH] ocaml: Add ocaml-down and ocaml-ocp-index 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

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

  git send-email \
    --in-reply-to=20210111205610.vnimx34apdkdqwvd@minitower \
    --to=aecepoglu@fastmail.fm \
    --cc=45762@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.