aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm210
1 files changed, 87 insertions, 123 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7fad276b4e..73267d32c3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2016, 2018-2020, 2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018-2020, 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016-2024 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -28,7 +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>
+;;; Copyright © 2023, 2024 Foundation Devices, Inc. <hello@foundation.xyz>
;;; Copyright © 2023 Arnaud DABY-SEESARAM <ds-ac@nanein.fr>
;;; Copyright © 2024 Sören Tempel <soeren@soeren-tempel.net>
;;;
@@ -87,6 +87,7 @@
#:use-module (gnu packages texinfo)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages unicode)
#:use-module (gnu packages version-control)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages web)
@@ -1320,7 +1321,7 @@ the OCaml core distribution.")
(build-system gnu-build-system)
(arguments
(list
- #:imported-modules `(,@%gnu-build-system-modules
+ #:imported-modules `(,@%default-gnu-imported-modules
(guix build emacs-build-system)
(guix build emacs-utils))
#:modules '((guix build gnu-build-system)
@@ -1404,69 +1405,6 @@ Knuth’s LR(1) parser construction technique.")
@code{Stdlib.Bigarray} in OCaml.")
(license license:isc)))
-(define-public lablgtk
- (package
- (name "lablgtk")
- (version "2.18.11")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/garrigue/lablgtk")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "179ipx0c6bpxm4gz0syxgqy09dp5p4x9qsdil7s9jlx8ffg1mm0w"))))
- (build-system gnu-build-system)
- (native-inputs
- `(("ocaml" ,ocaml)
- ("findlib" ,ocaml-findlib)
- ("pkg-config" ,pkg-config)))
- ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
- ;; and gtk+-quartz-2.0 once available.
- (inputs
- (list gtk+-2
- gtksourceview-2
- libgnomecanvas
- libgnomeui
- libglade
- librsvg))
- (arguments
- `(#:tests? #f ; no check target
-
- ;; opt: also install cmxa files
- #:make-flags (list "all" "opt"
- (string-append "FINDLIBDIR="
- (assoc-ref %outputs "out")
- "/lib/ocaml"))
- ;; Occasionally we would get "Error: Unbound module GtkThread" when
- ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
- #:parallel-build? #f
-
- #:phases
- (modify-phases %standard-phases
- (add-before 'install 'prepare-install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (ocaml (assoc-ref inputs "ocaml")))
- ;; Install into the output and not the ocaml directory.
- (mkdir-p (string-append out "/lib/ocaml"))
- (substitute* "config.make"
- ((ocaml) out))
- #t))))))
- (home-page "http://lablgtk.forge.ocamlcore.org/")
- (synopsis "GTK+ bindings for OCaml")
- (description
- "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
-a strongly-typed object-oriented interface that is compatible with the
-dynamic typing of GTK+. Most widgets and methods are available. LablGtk
-also provides bindings to
-gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
-gnomeui, gtksourceview, gtkspell,
-libglade (and it an generate OCaml code from .glade files),
-libpanel, librsvg and quartz.")
- (license license:lgpl2.1)))
-
(define-public binsec
(package
(name "binsec")
@@ -1503,7 +1441,7 @@ software engineering.")
(define-public unison
(package
(name "unison")
- (version "2.53.3")
+ (version "2.53.5")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1512,7 +1450,7 @@ software engineering.")
(file-name (git-file-name name version))
(sha256
(base32
- "05ihxk1yynw08586i06w19xab9r24h9hr6v9bknqm98qrlshm92w"))))
+ "1fy4c1wb6xn9gxdabs25yajbzik3amifyr7nzd4d9vn6r3gll9sw"))))
(build-system dune-build-system)
(propagated-inputs (list lablgtk3 zlib))
(native-inputs (list ghostscript (texlive-updmap.cfg '()) hevea lynx which))
@@ -2911,7 +2849,7 @@ yaml for OCaml types.")
ocaml-ppx-sexp-conv))
(native-inputs (list ocaml-ounit ocaml-sexplib0))
(properties `((upstream-name . "ppx_import")))
- (synopsis "Extension for importing declarations from interface files.")
+ (synopsis "Extension for importing declarations from interface files")
(description
"Ppx-import is a syntax extension for importing declarations from
interface files.")
@@ -3186,6 +3124,34 @@ OCaml with fibers.")
(define-public ocaml5.0-eio-luv
(package-with-ocaml5.0 ocaml-eio-luv))
+(define-public ocaml-unionfind
+ (package
+ (name "ocaml-unionfind")
+ (version "20220122")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.inria.fr/fpottier/unionfind")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0hdh56rbg8vfjd61q09cbmh8l5wmry5ykivg7gsm0v5ckkb3531r"))))
+ (build-system dune-build-system)
+ (arguments
+ (list ;; The test allocates an Array that is too large for OCaml when on a
+ ;; 32-bit architecture.
+ #:tests? (target-64bit?)))
+ (home-page "https://gitlab.inria.fr/fpottier/unionFind")
+ (synopsis "Union-find data structure")
+ (description "This package provides two union-find data structure
+implementations for OCaml. Both implementations are based on disjoint sets
+forests, with path compression and linking-by-rank, so as to guarantee good
+asymptotic complexity: every operation requires a quasi-constant number of
+accesses to the store.")
+ ;; Version 2 only, with linking exception.
+ (license license:lgpl2.0)))
+
(define-public ocaml-uring
(package
(name "ocaml-uring")
@@ -3464,14 +3430,14 @@ encoded in a resizable array.")
(define-public ocaml-luv
(package
(name "ocaml-luv")
- (version "0.5.11")
+ (version "0.5.12")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/aantron/luv/releases/download/"
version "/luv-" version ".tar.gz"))
(sha256
(base32
- "0hrsi8n2l31bcwgj847df4chjgqb9lmwkaky8fvvi15k25rz9v6c"))
+ "1h2n9iij4mh60sy3g437p1xwqyqpyw72fgh4417d8j9ahq46m7vn"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -3743,7 +3709,7 @@ and consumable.")
(define-public ocaml-sedlex
(package
(name "ocaml-sedlex")
- (version "2.6")
+ (version "3.2")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -3752,61 +3718,60 @@ and consumable.")
(file-name (git-file-name name version))
(sha256
(base32
- "1z8mmk1idh9hjhh2b9rp5b1h8kmzcxhagqkw0pvxn6ykx1brskq1"))))
+ "1vzsmp8mvx9vrgjr5chsk2p2s5ii08c9kizw9ilx78jj30nzamz5"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #f ; no tests
- #:package "sedlex"
- #:phases
- (modify-phases %standard-phases
- (add-before 'build 'copy-resources
- (lambda* (#:key inputs #:allow-other-keys)
- (with-directory-excursion "src/generator/data"
- ;; Newer versions of dune emit an error if files it wants to
- ;; build already exist. Delete the dune file so dune doesn't
- ;; complain.
- (delete-file "dune")
- (for-each
- (lambda (file)
- (copy-file (assoc-ref inputs file) file))
- '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
- "PropList.txt")))
- #t))
- (add-before 'build 'chmod
- (lambda _
- (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
- #t)))))
+ (list #:package "sedlex"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ ;; These three files are needed by src/generator/data/dune,
+ ;; but would be downloaded using curl at build time.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "src/generator/data"
+ ;; Newer versions of dune emit an error if files it wants to
+ ;; build already exist. Delete the dune file so dune doesn't
+ ;; complain.
+ (delete-file "dune")
+ (for-each
+ (lambda (file)
+ (copy-file (search-input-file inputs file)
+ (basename file)))
+ '("share/ucd/extracted/DerivedGeneralCategory.txt"
+ "share/ucd/DerivedCoreProperties.txt"
+ "share/ucd/PropList.txt")))))
+ (add-before 'build 'chmod
+ (lambda _
+ (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*")))))))
+ (native-inputs (list ocaml-ppx-expect))
(propagated-inputs
(list ocaml-gen ocaml-ppxlib ocaml-uchar))
- ;; These three files are needed by src/generator/data/dune, but would be
- ;; downloaded using curl at build time.
(inputs
- `(("DerivedCoreProperties.txt"
- ,(origin
- (method url-fetch)
- (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
- (sha256
- (base32
- "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
- ("DerivedGeneralCategory.txt"
- ,(origin
- (method url-fetch)
- (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
- (sha256
- (base32
- "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
- ("PropList.txt"
- ,(origin
- (method url-fetch)
- (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
- (sha256
- (base32
- "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
+ (list ucd))
(home-page "https://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-sedlex-2
+ (package
+ (inherit ocaml-sedlex)
+ (name "ocaml-sedlex")
+ (version "2.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml-community/sedlex")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1z8mmk1idh9hjhh2b9rp5b1h8kmzcxhagqkw0pvxn6ykx1brskq1"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments ocaml-sedlex)
+ ((#:tests? _ #t) #f))) ; no tests
+ (native-inputs '())))
+
(define-public ocaml-uchar
(package
(name "ocaml-uchar")
@@ -5209,7 +5174,7 @@ Format module of the OCaml standard library.")
(list which))
(propagated-inputs
`(("ocaml-xmlm" ,ocaml-xmlm)
- ("ocaml-sedlex" ,ocaml-sedlex)
+ ("ocaml-sedlex" ,ocaml-sedlex-2)
("ocaml-easy-format" ,ocaml-easy-format)
("ocaml-base64" ,ocaml-base64)))
(home-page "https://piqi.org")
@@ -8373,10 +8338,10 @@ convenience functions for vectors and matrices.")
(base32
"06ag9b88ihhr7yd3s9l0ac7ysig02fmlmsswybbsvz71ni0mb105"))))
(build-system dune-build-system)
+ (arguments
+ (list #:package "cairo2"))
(inputs
- `(("cairo" ,cairo)
- ("gtk+-2" ,gtk+-2)
- ("lablgtk" ,lablgtk)))
+ `(("cairo" ,cairo)))
(native-inputs
(list pkg-config))
(home-page "https://github.com/Chris00/ocaml-cairo")
@@ -8570,8 +8535,7 @@ generate OCaml code from .glade files), libpanel, librsvg and quartz.")
(package
(inherit lablgtk3)
(name "ocaml-lablgtk3-sourceview3")
- (propagated-inputs (list lablgtk3))
- (native-inputs (list gtksourceview-3 pkg-config))
+ (propagated-inputs (list gtksourceview-3 lablgtk3))
(arguments
`(#:package "lablgtk3-sourceview3"))
(synopsis "OCaml interface to GTK+ gtksourceview library")