summaryrefslogtreecommitdiff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm486
1 files changed, 482 insertions, 4 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 93020f1c06..28c6ab34fa 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -32,8 +32,10 @@
#:use-module (gnu packages emacs)
#:use-module (gnu packages gcc)
#:use-module (gnu packages ghostscript)
+ #:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages lynx)
#:use-module (gnu packages m4)
#:use-module (gnu packages multiprecision)
@@ -44,6 +46,7 @@
#:use-module (gnu packages tex)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages time)
+ #:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -804,10 +807,19 @@ other XUnit testing frameworks.")
`(#:phases
(modify-phases %standard-phases
(delete 'configure)
- (add-before 'install 'fix-install-name
- (lambda* (#:key #:allow-other-keys)
- (substitute* "Makefile"
- (("install zip") "install camlzip")))))
+ (add-after 'install 'install-camlzip
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
+ (mkdir-p dir)
+ (call-with-output-file (string-append dir "/META")
+ (lambda (port)
+ (format port "version=\"1.06\"\n")
+ (format port "requires=\"unix\"\n")
+ (format port "archive(byte)=\"zip.cma\"\n")
+ (format port "archive(native)=\"zip.cmxa\"\n")
+ (format port "archive(native,plugin)=\"zip.cmxs\"\n")
+ (format port "directory=\"../zip\"\n")))))))
#:install-target "install-findlib"
#:make-flags
(list "all" "allopt"
@@ -1218,3 +1230,469 @@ module automatically handles syntax errors, help messages and UNIX man page
generation. It supports programs with single or multiple commands and respects
most of the POSIX and GNU conventions.")
(license license:bsd-3)))
+
+(define-public ocaml-fmt
+ (package
+ (name "ocaml-fmt")
+ (version "0.8.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
+ version ".tbz"))
+ (sha256 (base32
+ "16y7ibndnairb53j8a6qgipyqwjxncn4pl9jiw5bxjfjm59108px"))))
+ (build-system ocaml-build-system)
+ (native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+ (propagated-inputs `(("result" ,ocaml-result)
+ ("cmdliner" ,ocaml-cmdliner)))
+ (arguments `(#:tests? #f
+ #:build-flags (list "build" "--with-base-unix" "true"
+ "--with-cmdliner" "true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "http://erratique.ch/software/fmt")
+ (synopsis "OCaml Format pretty-printer combinators")
+ (description "Fmt exposes combinators to devise Format pretty-printing
+functions.")
+ (license license:isc)))
+
+(define-public ocaml-astring
+ (package
+ (name "ocaml-astring")
+ (version "0.8.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
+ version ".tbz"))
+ (sha256 (base32
+ "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
+ (build-system ocaml-build-system)
+ (native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+ (arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "http://erratique.ch/software/astring")
+ (synopsis "Alternative String module for OCaml")
+ (description "Astring exposes an alternative String module for OCaml. This
+module balances minimality and expressiveness for basic, index-free, string
+processing and provides types and functions for substrings, string sets and
+string maps. The String module exposed by Astring has exception safe functions,
+removes deprecated and rarely used functions, alters some signatures and names,
+adds a few missing functions and fully exploits OCaml's newfound string
+immutability.")
+ (license license:isc)))
+
+(define-public ocaml-alcotest
+ (package
+ (name "ocaml-alcotest")
+ (version "0.7.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/mirage/alcotest/releases/"
+ "download/" version "/alcotest-" version ".tbz"))
+ (sha256
+ (base32
+ "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+ (propagated-inputs `(("fmt" ,ocaml-fmt)
+ ("astring" ,ocaml-astring)))
+ (home-page "https://github.com/mirage/alcotest")
+ (synopsis "Lightweight OCaml test framework")
+ (description "Alcotest exposes simple interface to perform unit tests. It
+exposes a simple TESTABLE module type, a check function to assert test
+predicates and a run function to perform a list of unit -> unit test callbacks.
+Alcotest provides a quiet and colorful output where only faulty runs are fully
+displayed at the end of the run (with the full logs ready to inspect), with a
+simple (yet expressive) query language to select the tests to run.")
+ (license license:isc)))
+
+(define-public ocaml-ppx-tools
+ (package
+ (name "ocaml-ppx-tools")
+ (version "5.0+4.02.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
+ version ".tar.gz"))
+ (sha256 (base32
+ "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+ #:tests? #f))
+ (home-page "https://github.com/alainfrisch/ppx_tools")
+ (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
+ (description "Tools for authors of ppx rewriters and other syntactic tools.")
+ (license license:expat)))
+
+(define-public ocaml-react
+ (package
+ (name "ocaml-react")
+ (version "1.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/react/releases/react-"
+ version ".tbz"))
+ (sha256 (base32
+ "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"))))
+ (build-system ocaml-build-system)
+ (native-inputs `(("opam" ,opam)))
+ (arguments `(#:tests? #f
+ #:build-flags (list "native=true" "native-dynlink=true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "http://erratique.ch/software/react")
+ (synopsis "Declarative events and signals for OCaml")
+ (description "React is an OCaml module for functional reactive programming
+(FRP). It provides support to program with time varying values: declarative
+events and signals. React doesn't define any primitive event or signal, it
+lets the client choose the concrete timeline.")
+ (license license:bsd-3)))
+
+(define-public ocaml-ssl
+ (package
+ (name "ocaml-ssl")
+ (version "0.5.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/savonet/ocaml-ssl/archive/"
+ version ".tar.gz"))
+ (sha256 (base32
+ "1ds5gzyzpcgwn7h40dmjkll7g990cr82ay05b2a7nrclvv6fdpg8"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:make-flags (list "OCAMLFIND_LDCONF=ignore")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'bootstrap
+ (lambda* (#:key #:allow-other-keys)
+ (system* "./bootstrap")
+ (substitute* "src/OCamlMakefile"
+ (("/bin/sh") (which "bash")))
+ (substitute* "configure"
+ (("/bin/sh") (which "bash"))))))))
+ (native-inputs `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("which" ,which)))
+ (propagated-inputs `(("openssl" ,openssl)))
+ (home-page "https://github.com/savonet/ocaml-ssl/")
+ (synopsis "OCaml bindings for OpenSSL")
+ (description "OCaml bindings for OpenSSL.")
+ (license license:lgpl2.1)))
+
+(define-public ocaml-lwt
+ (package
+ (name "ocaml-lwt")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
+ ".tar.gz"))
+ (sha256 (base32
+ "1gbw0g8a5a4b16diqrmlhc8ilnikrm4w3jjm1zq310maqg8z0zxz"))))
+ (build-system ocaml-build-system)
+ (arguments
+ `(#:configure-flags
+ (list "--enable-ssl" "--enable-glib" "--enable-react"
+ "--enable-ppx")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'disable-some-checks
+ (lambda* (#:key #:allow-other-keys)
+ (substitute* "tests/unix/main.ml"
+ (("Test_mcast.suite;") ""))))
+ (add-after 'install 'link-stubs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
+ (lib (string-append out "/lib/ocaml/site-lib/lwt")))
+ (mkdir-p stubs)
+ (symlink (string-append lib "/dlllwt-glib_stubs.so")
+ (string-append stubs "/dlllwt-glib_stubs.so"))
+ (symlink (string-append lib "/dlllwt-unix_stubs.so")
+ (string-append stubs "/dlllwt-unix_stubs.so"))))))))
+ (native-inputs `(("pkg-config" ,pkg-config)
+ ("ppx-tools" ,ocaml-ppx-tools)))
+ (inputs `(("libev" ,libev)
+ ("glib" ,glib)))
+ (propagated-inputs `(("result" ,ocaml-result)
+ ("ocaml-ssl" ,ocaml-ssl)
+ ("ocaml-react" ,ocaml-react)))
+ (home-page "https://github.com/ocsigen/lwt")
+ (synopsis "Cooperative threads and I/O in monadic style")
+ (description "Lwt provides typed, composable cooperative threads. These
+make it easy to run normally-blocking I/O operations concurrently in a single
+process. Also, in many cases, Lwt threads can interact without the need for
+locks or other synchronization primitives.")
+ (license license:lgpl2.1)))
+
+(define-public ocaml-logs
+ (package
+ (name "ocaml-logs")
+ (version "0.6.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/logs/releases/"
+ "logs-" version ".tbz"))
+ (sha256
+ (base32
+ "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:build-flags (list "build" "--with-js_of_ocaml" "false")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs `(("opam" ,opam)))
+ (propagated-inputs `(("fmt" ,ocaml-fmt)
+ ("lwt" ,ocaml-lwt)
+ ("mtime" ,ocaml-mtime)
+ ("result" ,ocaml-result)
+ ("cmdliner" ,ocaml-cmdliner)
+ ("topkg" ,ocaml-topkg)))
+ (home-page "http://erratique.ch/software/logs")
+ (synopsis "Logging infrastructure for OCaml")
+ (description "Logs provides a logging infrastructure for OCaml. Logging is
+performed on sources whose reporting level can be set independently. Log
+message report is decoupled from logging and is handled by a reporter.")
+ (license license:isc)))
+
+(define-public ocaml-fpath
+ (package
+ (name "ocaml-fpath")
+ (version "0.7.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/fpath/releases/"
+ "fpath-" version ".tbz"))
+ (sha256
+ (base32
+ "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs `(("opam" ,opam)))
+ (propagated-inputs `(("topkg" ,ocaml-topkg)
+ ("astring" ,ocaml-astring)))
+ (home-page "http://erratique.ch/software/fpath")
+ (synopsis "File system paths for OCaml")
+ (description "Fpath is an OCaml module for handling file system paths with
+POSIX or Windows conventions. Fpath processes paths without accessing the
+file system and is independent from any system library.")
+ (license license:isc)))
+
+(define-public ocaml-bos
+ (package
+ (name "ocaml-bos")
+ (version "0.1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/bos/releases/"
+ "bos-" version ".tbz"))
+ (sha256
+ (base32
+ "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs `(("opam" ,opam)))
+ (propagated-inputs `(("topkg" ,ocaml-topkg)
+ ("astring" ,ocaml-astring)
+ ("fmt" ,ocaml-fmt)
+ ("fpath" ,ocaml-fpath)
+ ("logs" ,ocaml-logs)
+ ("rresult" ,ocaml-rresult)))
+ (home-page "http://erratique.ch/software/bos")
+ (synopsis "Basic OS interaction for OCaml")
+ (description "Bos provides support for basic and robust interaction with
+the operating system in OCaml. It has functions to access the process
+environment, parse command line arguments, interact with the file system and
+run command line programs.")
+ (license license:isc)))
+
+(define-public ocaml-xmlm
+ (package
+ (name "ocaml-xmlm")
+ (version "1.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/xmlm/releases/"
+ "xmlm-" version ".tbz"))
+ (sha256
+ (base32
+ "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key #:allow-other-keys)
+ (zero? (system* "pkg/build" "true")))))))
+ (native-inputs `(("opam" ,opam)))
+ (home-page "http://erratique.ch/software/xmlm")
+ (synopsis "Streaming XML codec for OCaml")
+ (description "Xmlm is a streaming codec to decode and encode the XML data
+format. It can process XML documents without a complete in-memory
+representation of the data.")
+ (license license:isc)))
+
+(define-public ocaml-ulex
+ (package
+ (name "ocaml-ulex")
+ (version "1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.cduce.org/download/ulex-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0fjlkwps14adfgxdrbb4yg65fhyimplvjjs1xqj5np197cig67x0"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
+ #:tests? #f
+ #:make-flags
+ (list "all.opt"
+ (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
+ "-cflags -I,"
+ (assoc-ref %build-inputs "camlp4")
+ "/lib/ocaml/site-lib/camlp4"))))
+ (native-inputs `(("camlp4" ,camlp4)))
+ (home-page "http://www.cduce.org/download.html#side")
+ (synopsis "Lexer generator for Unicode and OCaml")
+ (description "Lexer generator for Unicode and OCaml.")
+ (license license:expat)))
+
+(define-public ocaml-uchar
+ (package
+ (name "ocaml-uchar")
+ (version "0.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
+ version "/uchar-" version ".tbz"))
+ (sha256 (base32
+ "0ficw1x7ymbd6m8hqw3w1aycwm1hbwd6bad3c5pspwnzh3qlikhi"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:build-flags (list "native=true" "native-dynlink=true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs `(("opam" ,opam)))
+ (home-page "https://github.com/ocaml/uchar")
+ (synopsis "Compatibility library for OCaml's Uchar module")
+ (description "The uchar package provides a compatibility library for the
+`Uchar` module introduced in OCaml 4.03.")
+ (license license:lgpl2.1)))
+
+(define-public ocaml-uutf
+ (package
+ (name "ocaml-uutf")
+ (version "1.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/uutf/releases/"
+ "uutf-" version ".tbz"))
+ (sha256
+ (base32
+ "08i0cw02cxw4mi2rs01v9xi307qshs6fnd1dlqyb52kcxzblpp37"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+ (propagated-inputs `(("uchar" ,ocaml-uchar)
+ ("cmdliner" ,ocaml-cmdliner)))
+ (home-page "http://erratique.ch/software/uutf")
+ (synopsis "Non-blocking streaming Unicode codec for OCaml")
+ (description "Uutf is a non-blocking streaming codec to decode and encode
+the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
+work character by character without blocking on IO. Decoders perform character
+position tracking and support newline normalization.
+
+Functions are also provided to fold over the characters of UTF encoded OCaml
+string values and to directly encode characters in OCaml Buffer.t values.")
+ (license license:isc)))
+
+(define-public ocaml-jsonm
+ (package
+ (name "ocaml-jsonm")
+ (version "1.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://erratique.ch/software/jsonm/releases/"
+ "jsonm-" version ".tbz"))
+ (sha256
+ (base32
+ "1v3ln6d965lplj28snjdqdqablpp1kx8bw2cfx0m6i157mqyln62"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:tests? #f
+ #:build-flags (list "build")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs `(("opam" ,opam)
+ ("topkg" ,ocaml-topkg)))
+ (propagated-inputs `(("uutf" ,ocaml-uutf)
+ ("cmdliner" ,ocaml-cmdliner)))
+ (home-page "http://erratique.ch/software/jsonm")
+ (synopsis "Non-blocking streaming JSON codec for OCaml")
+ (description "Jsonm is a non-blocking streaming codec to decode and encode
+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-ocurl
+ (package
+ (name "ocaml-ocurl")
+ (version "0.7.9")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0pm6nm33wi0p9h765k6zb94ljpknryam4qd1hmb2rsk2y0y1181n"))))
+ (build-system ocaml-build-system)
+ (arguments `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'fix-/bin/sh
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "configure"
+ (("-/bin/sh") (string-append "-" (which "bash")))))))))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("curl" ,curl)))
+ (home-page "http://ocurl.forge.ocamlcore.org/")
+ (synopsis "OCaml bindings for libcurl")
+ (description "Client-side URL transfer library, supporting HTTP and a
+multitude of other network protocols (FTP/SMTP/RTSP/etc).")
+ (license license:isc)))