diff options
| author | aecepoglu <aecepoglu@fastmail.fm> | 2021-01-11 23:56:10 +0300 |
|---|---|---|
| committer | Julien Lepiller <julien@lepiller.eu> | 2021-01-12 15:03:59 +0100 |
| commit | e3b71ee6dcb87452192fb4f5df9eeea31f1c1cfd (patch) | |
| tree | 51682377883b28517f5b2851b818c1e88f9bc4fc /gnu | |
| parent | 564cbfd99fd9d5bd462b33edb2af071ca3a4a5a1 (diff) | |
ocaml: Add ocaml-down.
* gnu/packages/ocaml.scm (ocaml-down): New variable.
Signed-off-by: Julien Lepiller <julien@lepiller.eu>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/ocaml.scm | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 4294d25efd9..8a91a79c364 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm | |||
| @@ -391,6 +391,69 @@ repository-wide uninstallability checks.") | |||
| 391 | ;; with static-linking exception | 391 | ;; with static-linking exception |
| 392 | (license license:lgpl2.1+))) | 392 | (license license:lgpl2.1+))) |
| 393 | 393 | ||
| 394 | (define-public ocaml-down | ||
| 395 | (package | ||
| 396 | (name "ocaml-down") | ||
| 397 | (version "0.0.3") | ||
| 398 | (source | ||
| 399 | (origin | ||
| 400 | (method url-fetch) | ||
| 401 | (uri (string-append "https://erratique.ch/software/down/releases/down-" | ||
| 402 | version ".tbz")) | ||
| 403 | (sha256 | ||
| 404 | (base32 | ||
| 405 | "1nz2f5j17frgr2vrslcz9klmi6w9sm2vqwwwpi33ngcm3rgmsrlg")))) | ||
| 406 | (build-system ocaml-build-system) | ||
| 407 | (arguments | ||
| 408 | `(#:tests? #f ;no tests | ||
| 409 | #:phases | ||
| 410 | (modify-phases %standard-phases | ||
| 411 | (delete 'configure)) | ||
| 412 | #:build-flags | ||
| 413 | (list "build" "--lib-dir" | ||
| 414 | (string-append (assoc-ref %outputs "out") "/lib/ocaml/site-lib")))) | ||
| 415 | (native-inputs | ||
| 416 | `(("ocaml-findlib" ,ocaml-findlib) | ||
| 417 | ("ocamlbuild" ,ocamlbuild) | ||
| 418 | ("ocaml-topkg" ,ocaml-topkg) | ||
| 419 | ("opam" ,opam))) | ||
| 420 | (home-page "https://erratique.ch/software/down") | ||
| 421 | (synopsis "OCaml toplevel (REPL) upgrade") | ||
| 422 | (description "Down is an unintrusive user experience upgrade for the | ||
| 423 | @command{ocaml} toplevel (REPL). | ||
| 424 | |||
| 425 | Simply load the zero dependency @code{down} library in the @command{ocaml} | ||
| 426 | toplevel and you get line edition, history, session support and identifier | ||
| 427 | completion and documentation with @command{ocp-index}. | ||
| 428 | |||
| 429 | Add this to your @file{~/.ocamlinit}: | ||
| 430 | |||
| 431 | @example | ||
| 432 | #use \"down.top\" | ||
| 433 | @end example | ||
| 434 | |||
| 435 | You may also need to add this to your @file{~/.ocamlinit} and declare | ||
| 436 | the environment variable @code{OCAML_TOPLEVEL_PATH}: | ||
| 437 | |||
| 438 | @example | ||
| 439 | let () = | ||
| 440 | try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\") | ||
| 441 | with Not_found -> () | ||
| 442 | @end example | ||
| 443 | |||
| 444 | OR | ||
| 445 | |||
| 446 | @example | ||
| 447 | let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\") | ||
| 448 | |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\") | ||
| 449 | |> List.map (fun x -> x ^ \"/toplevel\") | ||
| 450 | (* remove the line below if you don't want to see the text | ||
| 451 | every time you start the toplevel *) | ||
| 452 | |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x) | ||
| 453 | |> List.iter Topdirs.dir_directory;; | ||
| 454 | @end example") | ||
| 455 | (license license:isc))) | ||
| 456 | |||
| 394 | (define-public ocaml-opam-file-format | 457 | (define-public ocaml-opam-file-format |
| 395 | (package | 458 | (package |
| 396 | (name "ocaml-opam-file-format") | 459 | (name "ocaml-opam-file-format") |
