GNU bug report logs -
#45762
[PATCH] ocaml: Add ocaml-down and ocaml-ocp-index
Previous Next
Reported by: aecepoglu <aecepoglu <at> fastmail.fm>
Date: Sun, 10 Jan 2021 12:38:03 UTC
Severity: normal
Tags: patch
Done: Julien Lepiller <julien <at> lepiller.eu>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 45762 <at> debbugs.gnu.org (full text, mbox):
---
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
This bug report was last modified 4 years and 209 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.