diff options
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r-- | gnu/packages/ocaml.scm | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index f0b8f9e912..ab0aa0574a 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org> ;;; Copyright © 2023 Csepp <raingloom@riseup.net> +;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -2698,6 +2699,76 @@ simple (yet expressive) query language to select the tests to run.") syntactic tools.") (license license:expat))) +(define-public ocaml-parmap + (package + (name "ocaml-parmap") + (version "1.2.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rdicosmo/parmap") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0x5gnfap9f7kmgh8j725vxlbkvlplwzbpn8jdx2ywfa3dd6bn6xl")))) + (build-system dune-build-system) + (propagated-inputs + (list ocaml-odoc)) + (home-page "https://github.com/rdicosmo/parmap") + (synopsis "Parallel map and fold primtives for OCaml") + (description + "Library to perform parallel fold or map taking advantage of multiple +core architectures for OCaml programs. Drop-in replacement for these +@code{List} operations are provided: + +@itemize +@item @code{List.map} -> @code{parmap} +@item @code{List.map} -> @code{parfold} +@item @code{List.mapfold} -> @code{parmapfold} +@end itemize + +Also it allows specifying the number of cores to use with the optional +parameter @code{ncores}.") + (license (list license:lgpl2.0 + (license:fsdg-compatible "file://LICENSE" + "See LICENSE file for details"))))) + +(define-public ocaml-pyml + ;; NOTE: Using commit from master branch as 20220905 does not support + ;; Python 3.10. + (let ((revision "0") + (commit "e33f4c49cc97e7bc6f8e5faaa64cce994470642e")) + (package + (name "ocaml-pyml") + (version (git-version "20220905" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/thierry-martinez/pyml") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1v421i5cvj8mbgrg5cs78bz1yzdprm9r5r41niiy20d3j7j8jx9k")))) + (build-system dune-build-system) + (propagated-inputs + (list ocaml-stdcompat + python + python-numpy)) + (home-page "https://github.com/thierry-martinez/pyml") + (synopsis "Python bindings for OCaml") + (description "Library that allows OCaml programs to interact with Python +modules and objects. The library also provides low-level bindings to the +Python C API. + +This library is an alternative to @code{pycaml} which is no longer +maintained. The @code{Pycaml} module provides a signature close to +@code{pycaml}, to ease migration of code to this library.") + (license license:bsd-2)))) + (define-public ocaml-react (package (name "ocaml-react") @@ -4569,6 +4640,52 @@ of interactive program. You can match the question using a regular expression or a timeout.") (license license:lgpl2.1+))) ; with the OCaml static compilation exception +(define-public ocaml-stdcompat + (package + (name "ocaml-stdcompat") + (version "19") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/thierry-martinez/stdcompat") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + #~(for-each delete-file '("Makefile.in" "configure"))) + (sha256 + (base32 + "0r9qcfjkn8634lzxp5bkagzwsi3vmg0hb6vq4g1p1515rys00h1b")))) + (build-system dune-build-system) + (arguments + (list #:imported-modules `((guix build gnu-build-system) + ,@%dune-build-system-modules) + #:modules '((guix build dune-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'bootstrap + (assoc-ref gnu:%standard-phases 'bootstrap)) + (add-before 'build 'prepare-build + (lambda _ + (let ((bash (which "bash"))) + (setenv "CONFIG_SHELL" bash) + (setenv "SHELL" bash))))))) + (native-inputs + (list autoconf + automake + ocaml + ocaml-findlib)) + (home-page "https://github.com/thierry-martinez/stdcompat") + (synopsis "Compatibility module for OCaml standard library") + (description + "Compatibility module for OCaml standard library allowing programs to use +some recent additions to the standard library while preserving the ability to +be compiled on former versions of OCaml.") + (license license:bsd-2))) + (define-public ocaml-stdlib-shims (package (name "ocaml-stdlib-shims") |