[PATCH 0/5] Add ocaml-owl and ocaml-toml.

  • Open
  • quality assurance status badge
Details
2 participants
  • Anders Ågren Thuné
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Anders Ågren Thuné
Severity
normal
A
A
Anders Ågren Thuné wrote on 30 Jun 2023 19:26
(address . guix-patches@gnu.org)(name . Anders Ågren Thuné)(address . anders@aathn.org)
20230630172616.23296-1-anders@aathn.org
Hello,

This patch series adds the OCaml packages owl and toml, and their
dependencies. These packages are used for scientific computing and handling
toml files, respectively.

Anders Ågren Thuné (5):
gnu: Add ocaml-ISO8601.
gnu: Add ocaml-ocb.
gnu: Add ocaml-npy.
gnu: Add ocaml-toml.
gnu: Add ocaml-owl.

gnu/packages/ocaml.scm | 126 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 126 insertions(+)


base-commit: 8af22b493199a17f46351c2f3d9f6ee759e48564
--
2.40.1
A
A
Anders Ågren Thuné wrote on 1 Jul 2023 19:43
[PATCH 2/5] gnu: Add ocaml-ocb.
(address . 64400@debbugs.gnu.org)(name . Anders Ågren Thuné)(address . anders@aathn.org)
20230701174258.21019-2-anders@aathn.org
* gnu/packages/ocaml.scm (ocaml-ocb): New variable.
---
gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index abdf09bdc1..f2170a3060 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2726,6 +2726,28 @@ (define-public ocaml-ISO8601
"OCaml parser and printer for date-times in ISO8601 and RFC 3339")
(license license:expat))))
+(define-public ocaml-ocb
+ (package
+ (name "ocaml-ocb")
+ (version "0.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/OCamlPro/ocb")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1nk90jax91ld8qd36qi408mll8a7w1d60fa2qdsnff7cldwixc1d"))))
+ (build-system dune-build-system)
+ (propagated-inputs (list ocaml-odoc))
+ (home-page "https://ocamlpro.github.io/ocb/")
+ (synopsis "SVG badge generator")
+ (description
+ "An OCaml library for SVG badge generation. There's also a command-line tool
+provided.")
+ (license license:isc)))
+
(define-public ocaml-parmap
(package
(name "ocaml-parmap")
--
2.40.1
A
A
Anders Ågren Thuné wrote on 1 Jul 2023 19:43
[PATCH 1/5] gnu: Add ocaml-ISO8601.
(address . 64400@debbugs.gnu.org)(name . Anders Ågren Thuné)(address . anders@aathn.org)
20230701174258.21019-1-anders@aathn.org
* gnu/packages/ocaml.scm (ocaml-ISO8601): New variable.
---
gnu/packages/ocaml.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ab0aa0574a..abdf09bdc1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org>
;;; Copyright © 2023 Csepp <raingloom@riseup.net>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
+;;; Copyright © 2023 Anders Ågren Thuné <anders@aathn.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2699,6 +2700,32 @@ (define-public ocaml-ppx-tools
syntactic tools.")
(license license:expat)))
+(define-public ocaml-ISO8601
+ ;; NOTE: Using commit from master branch as 0.2.6 uses the Pervasives
+ ;; module in its tests, which is incompatible with OCaml 5.0.
+ (let ((revision "0")
+ (commit "ad50cb01061405623c834608c26f1ef2d44f8340"))
+ (package
+ (name "ocaml-ISO8601")
+ (version (git-version "0.2.6" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml-community/ISO8601.ml")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1lvjrxz66b7dv40cbl8xyfv3x8nmwj0m5ipfvxc37mjaaf3xrr5g"))))
+ (build-system dune-build-system)
+ (propagated-inputs (list ocaml-odoc))
+ (native-inputs (list ocaml-ounit))
+ (home-page "https://github.com/ocaml-community/ISO8601.ml/")
+ (synopsis "ISO 8601 and RFC 3339 date parsing for OCaml")
+ (description
+ "OCaml parser and printer for date-times in ISO8601 and RFC 3339")
+ (license license:expat))))
+
(define-public ocaml-parmap
(package
(name "ocaml-parmap")
--
2.40.1
A
A
Anders Ågren Thuné wrote on 1 Jul 2023 19:43
[PATCH 5/5] gnu: Add ocaml-owl.
(address . 64400@debbugs.gnu.org)(name . Anders Ågren Thuné)(address . anders@aathn.org)
20230701174258.21019-5-anders@aathn.org
* gnu/packages/ocaml.scm (ocaml-owl): New variable.
---
gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 83077addb0..f118c1289e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2797,6 +2797,34 @@ (define-public ocaml-toml
OCaml primitive types are also supplied.")
(license license:lgpl3)))
+(define-public ocaml-owl
+ (package
+ (name "ocaml-owl")
+ (version "1.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/owlbarn/owl")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "08jvgf1fd7d28cxxjifx4ikmwcbfbiyw0sivw3xy4vdzvbyc9xw9"))))
+ (build-system dune-build-system)
+ (propagated-inputs (list openblas zlib ocaml-ctypes ocaml-npy ocaml-compiler-libs))
+ (native-inputs (list ocaml-alcotest ocaml-base ocaml-stdio))
+ (home-page "https://github.com/owlbarn/owl")
+ (synopsis "OCaml Scientific and Engineering Computing")
+ (description
+ "Owl is an OCaml numerical library. It supports N-dimensional
+arrays, both dense and sparse matrix operations, linear algebra,
+regressions, fast Fourier transforms, and many advanced mathematical
+and statistical functions (such as Markov chain Monte Carlo methods).
+Recently, Owl has implemented algorithmic differentiation which
+simplifies developing machine learning and neural network
+algorithms.")
+ (license license:expat)))
+
(define-public ocaml-parmap
(package
(name "ocaml-parmap")
--
2.40.1
A
A
Anders Ågren Thuné wrote on 1 Jul 2023 19:43
[PATCH 3/5] gnu: Add ocaml-npy.
(address . 64400@debbugs.gnu.org)(name . Anders Ågren Thuné)(address . anders@aathn.org)
20230701174258.21019-3-anders@aathn.org
* gnu/packages/ocaml.scm (ocaml-npy): New variable.
---
gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f2170a3060..083c1aca99 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2748,6 +2748,30 @@ (define-public ocaml-ocb
provided.")
(license license:isc)))
+(define-public ocaml-npy
+ (package
+ (name "ocaml-npy")
+ (version "0.0.9")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/LaurentMazare/npy-ocaml")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1fryglkm20h6kdqjl55b7065b34bdg3g3p6j0jv33zvd1m5888m1"))))
+ (build-system dune-build-system)
+ (native-inputs (list zlib python-wrapper python-numpy))
+ (propagated-inputs (list camlzip))
+ (home-page "https://github.com/LaurentMazare/npy-ocaml")
+ (synopsis "Numpy npy file format reading/writing for OCaml")
+ (description
+ "A library providing simple read/write function using the numpy npy/npz
+file formats. These can be used to save a bigarray to disk and then load it
+from python using numpy.")
+ (license license:asl2.0)))
+
(define-public ocaml-parmap
(package
(name "ocaml-parmap")
--
2.40.1
A
A
Anders Ågren Thuné wrote on 1 Jul 2023 19:43
[PATCH 4/5] gnu: Add ocaml-toml.
(address . 64400@debbugs.gnu.org)(name . Anders Ågren Thuné)(address . anders@aathn.org)
20230701174258.21019-4-anders@aathn.org
* gnu/packages/ocaml.scm (ocaml-toml): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 083c1aca99..83077addb0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2772,6 +2772,31 @@ (define-public ocaml-npy
from python using numpy.")
(license license:asl2.0)))
+(define-public ocaml-toml
+ (package
+ (name "ocaml-toml")
+ (version "7.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml-toml/to.ml")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0z2873mj3i6h9cg8zlkipcjab8jympa4c4avhk4l04755qzphkds"))))
+ (build-system dune-build-system)
+ (propagated-inputs (list ocaml-odoc ocaml-ISO8601))
+ (native-inputs
+ (list ocaml-menhir ocaml-ounit2 ocaml-mdx ocaml-bisect-ppx ocaml-ocb))
+ (home-page "https://ocaml-toml.github.io/To.ml/")
+ (synopsis "Library for TOML with a parser, a serializer and a printer")
+ (description
+ "toml is an OCaml library providing a parser, a serializer and a printer for
+TOML, a minimal configuration file format. Helpful getters to retrieve data as
+OCaml primitive types are also supplied.")
+ (license license:lgpl3)))
+
(define-public ocaml-parmap
(package
(name "ocaml-parmap")
--
2.40.1
L
L
Liliana Marie Prikler wrote on 11 Jul 2023 20:30
Re: [PATCH 1/5] gnu: Add ocaml-ISO8601.
f6544b5ff6c6a70eb4c6f101360917c5112a43b1.camel@gmail.com
Am Samstag, dem 01.07.2023 um 17:43 +0000 schrieb Anders Ågren Thuné:
Toggle quote (47 lines)
> * gnu/packages/ocaml.scm (ocaml-ISO8601): New variable.
> ---
>  gnu/packages/ocaml.scm | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index ab0aa0574a..abdf09bdc1 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -29,6 +29,7 @@
>  ;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org>
>  ;;; Copyright © 2023 Csepp <raingloom@riseup.net>
>  ;;; Copyright © 2023 Foundation Devices, Inc.
> <hello@foundationdevices.com>
> +;;; Copyright © 2023 Anders Ågren Thuné <anders@aathn.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -2699,6 +2700,32 @@ (define-public ocaml-ppx-tools
>  syntactic tools.")
>      (license license:expat)))
>  
> +(define-public ocaml-ISO8601
> +  ;; NOTE: Using commit from master branch as 0.2.6 uses the
> Pervasives
> +  ;; module in its tests, which is incompatible with OCaml 5.0.
> +  (let ((revision "0")
> +        (commit "ad50cb01061405623c834608c26f1ef2d44f8340"))
> +    (package
> +      (name "ocaml-ISO8601")
> +      (version (git-version "0.2.6" revision commit))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url
> "https://github.com/ocaml-community/ISO8601.ml")
> +                      (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> +                 
> "1lvjrxz66b7dv40cbl8xyfv3x8nmwj0m5ipfvxc37mjaaf3xrr5g"))))
> +      (build-system dune-build-system)
> +      (propagated-inputs (list ocaml-odoc))
> +      (native-inputs (list ocaml-ounit))
> +      (home-page "https://github.com/ocaml-community/ISO8601.ml/")
> +      (synopsis "ISO 8601 and RFC 3339 date parsing for OCaml")
Can probably be shortened to "OCaml date parsing"
Toggle quote (3 lines)
> +      (description
> +       "OCaml parser and printer for date-times in ISO8601 and RFC
> 3339")
The description should consist at least of one complete sentence. The
typical go to pattern here if information is scarce is "this package
provides…" as in "This package provides an OCaml library with parsers
and printers for date times in ISO 8601 and RFC 3339 formats."

Cheers
L
L
Liliana Marie Prikler wrote on 11 Jul 2023 20:31
Re: [PATCH 2/5] gnu: Add ocaml-ocb.
dd75e9fa3bfd1e95c56f979197e163d76f093047.camel@gmail.com
Am Samstag, dem 01.07.2023 um 17:43 +0000 schrieb Anders Ågren Thuné:
Toggle quote (36 lines)
> * gnu/packages/ocaml.scm (ocaml-ocb): New variable.
> ---
>  gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index abdf09bdc1..f2170a3060 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -2726,6 +2726,28 @@ (define-public ocaml-ISO8601
>         "OCaml parser and printer for date-times in ISO8601 and RFC
> 3339")
>        (license license:expat))))
>  
> +(define-public ocaml-ocb
> +  (package
> +    (name "ocaml-ocb")
> +    (version "0.2")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/OCamlPro/ocb")
> +                    (commit version)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +               
> "1nk90jax91ld8qd36qi408mll8a7w1d60fa2qdsnff7cldwixc1d"))))
> +    (build-system dune-build-system)
> +    (propagated-inputs (list ocaml-odoc))
> +    (home-page "https://ocamlpro.github.io/ocb/")
> +    (synopsis "SVG badge generator")
> +    (description
> +     "An OCaml library for SVG badge generation.  There's also a
> command-line tool
> +provided.")
"This package provides an OCaml library and command-line tool for
creating SVG badges" :)
L
L
Liliana Marie Prikler wrote on 11 Jul 2023 20:37
Re: [PATCH 5/5] gnu: Add ocaml-owl.
f1d778f11a309ce01b809159bd570ad3a2606c94.camel@gmail.com
Am Samstag, dem 01.07.2023 um 17:43 +0000 schrieb Anders Ågren Thuné:
Toggle quote (30 lines)
> * gnu/packages/ocaml.scm (ocaml-owl): New variable.
> ---
>  gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 83077addb0..f118c1289e 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -2797,6 +2797,34 @@ (define-public ocaml-toml
>  OCaml primitive types are also supplied.")
>      (license license:lgpl3)))
>  
> +(define-public ocaml-owl
> +  (package
> +    (name "ocaml-owl")
> +    (version "1.1")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/owlbarn/owl")
> +                    (commit version)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +               
> "08jvgf1fd7d28cxxjifx4ikmwcbfbiyw0sivw3xy4vdzvbyc9xw9"))))
> +    (build-system dune-build-system)
> +    (propagated-inputs (list openblas zlib ocaml-ctypes ocaml-npy
> ocaml-compiler-libs))
I'm pretty sure some of those inputs shouldn't be propagated.
Toggle quote (13 lines)
> +    (native-inputs (list ocaml-alcotest ocaml-base ocaml-stdio))
> +    (home-page "https://github.com/owlbarn/owl")
> +    (synopsis "OCaml Scientific and Engineering Computing")
> +    (description
> +     "Owl is an OCaml numerical library.  It supports N-dimensional
> +arrays, both dense and sparse matrix operations, linear algebra,
> +regressions, fast Fourier transforms, and many advanced mathematical
> +and statistical functions (such as Markov chain Monte Carlo
> methods).
> +Recently, Owl has implemented algorithmic differentiation which
> +simplifies developing machine learning and neural network
> +algorithms.")
> +    (license license:expat)))
This package sadly fails to build on aarch64 and probably also has
issues on other architectures, as it assumes some build flags specific
to x86_64 (see the CI build logs). These should be stripped in a
patch, snippet or pre-build phase. If these flags are there for
performance reasons, you should instead mark the package as tunable.

Cheers
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 64400@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64400
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch