* [bug#45558] [PATCH] Add js_of_ocaml
@ 2020-12-30 19:22 divoplade
2021-05-03 12:38 ` pukkamustard
0 siblings, 1 reply; 4+ messages in thread
From: divoplade @ 2020-12-30 19:22 UTC (permalink / raw)
To: 45558
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
Dear guix,
I finally got js_of_ocaml packaged. I'm not sure I did everything
correctly (especially indentation, but also how to make non-4.07
packages, and whether the package should have multiple outputs
corresponding to the opam packages), so do not hesitate to sendfeedback.
Best regards,
divoplade
[-- Attachment #2: 0001-gnu-Add-ocaml-compiler-libs.patch --]
[-- Type: text/x-patch, Size: 3853 bytes --]
From 0a753eb2d96b2deb7059bce0be6846f6623a85e4 Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 30 Dec 2020 18:45:28 +0100
Subject: [PATCH 1/5] gnu: Add ocaml-compiler-libs
* gnu/packages/ocaml.scm (ocaml-compiler-libs): New variable.
(ocaml4.07-compiler-libs): Inherit from ocaml-compiler-libs.
---
gnu/packages/ocaml.scm | 45 +++++++++++++++++++++++++++++++-----------
1 file changed, 33 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2df16e7cd2..4b1ed09a79 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3683,7 +3683,7 @@ syntax checking on dedukti files.")
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
+ ("ocaml-compiler-libs" ,(package-with-ocaml4.07 ocaml-compiler-libs))
("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
("ocaml-stdio" ,ocaml4.07-stdio)
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@@ -4285,10 +4285,10 @@ provided by companion libraries such as
#:dune ,ocaml4.07-dune))
(properties '()))))
-(define-public ocaml4.07-compiler-libs
+(define-public ocaml-compiler-libs
(package
- (name "ocaml4.07-compiler-libs")
- (version "0.11.0")
+ (name "ocaml-compiler-libs")
+ (version "0.12.3")
(home-page "https://github.com/janestreet/ocaml-compiler-libs")
(source
(origin
@@ -4299,20 +4299,41 @@ provided by companion libraries such as
(file-name (git-file-name name version))
(sha256
(base32
- "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
+ "00nrar7h2pyflbdiq6wwwrb4k5jh9iff0jllihzm6ms8d5pspsg5"))))
(build-system dune-build-system)
- (arguments
- `(#:tests? #f ;no tests
- #:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
- (properties `((upstream-name . "ocaml-compiler-libs")))
+ (arguments `(#:tests? #f))
+ (properties `((upstream-name . "ocaml-compiler-libs")
+ (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs))))
(synopsis "Compiler libraries repackaged")
(description "This package simply repackages the OCaml compiler libraries
so they don't expose everything at toplevel. For instance, @code{Ast_helper}
is now @code{Ocaml_common.Ast_helper}.")
(license license:expat)))
+(define-public ocaml4.07-compiler-libs
+ (package-with-ocaml4.07
+ (package
+ (inherit ocaml-compiler-libs)
+ (name "ocaml4.07-compiler-libs")
+ (version "0.11.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append (package-home-page ocaml-compiler-libs)
+ ".git"))
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
+ (arguments
+ `(#:tests? #f ;no tests
+ #:ocaml ,ocaml-4.07
+ #:findlib ,ocaml4.07-findlib
+ #:dune ,ocaml4.07-dune))
+ (properties '()))))
+
(define-public ocaml4.07-stdio
(package
(name "ocaml4.07-stdio")
@@ -4389,7 +4410,7 @@ as part of the same ocaml-migrate-parsetree driver.")
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
+ ("ocaml-compiler-libs" ,(package-with-ocaml4.07 ocaml-compiler-libs))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppx-derivers" ,(package-with-ocaml4.07 ocaml-ppx-derivers))
--
2.29.2
[-- Attachment #3: 0002-gnu-Add-ocaml-stdio.patch --]
[-- Type: text/x-patch, Size: 11871 bytes --]
From 042ecb06d915acd7e97373122772bf9458ed82f1 Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 30 Dec 2020 18:56:09 +0100
Subject: [PATCH 2/5] gnu: Add ocaml-stdio
* gnu/packages/ocaml.scm (ocaml-stdio): New variable.
(ocaml4.07-stdio): Inherit from ocaml-stdio.
---
gnu/packages/ocaml.scm | 155 +++++++++++++++++++++--------------------
1 file changed, 81 insertions(+), 74 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4b1ed09a79..9e19772997 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1636,7 +1636,7 @@ library.")
#:dune ,ocaml4.07-dune))
(native-inputs
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-stdio" ,ocaml4.07-stdio)
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
("pkg-config" ,pkg-config)))
(inputs
`(("sqlite" ,sqlite)))
@@ -3685,7 +3685,7 @@ syntax checking on dedukti files.")
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-compiler-libs" ,(package-with-ocaml4.07 ocaml-compiler-libs))
("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
- ("ocaml-stdio" ,ocaml4.07-stdio)
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
(properties `((upstream-name . "ppx_inline_test")))
(synopsis "Syntax extension for writing in-line tests in ocaml code")
@@ -4028,7 +4028,7 @@ Atom.")
`(("gsl" ,gsl)))
(propagated-inputs
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-stdio" ,ocaml4.07-stdio)))
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
(home-page "https://mmottl.github.io/gsl-ocaml")
(synopsis "Bindings to the GNU Scientific Library")
(description
@@ -4334,37 +4334,44 @@ is now @code{Ocaml_common.Ast_helper}.")
#:dune ,ocaml4.07-dune))
(properties '()))))
-(define-public ocaml4.07-stdio
+(define-public ocaml-stdio
(package
- (name "ocaml4.07-stdio")
- (version "0.11.0")
+ (name "ocaml-stdio")
+ (version "0.14.0")
(home-page "https://github.com/janestreet/stdio")
(source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url (string-append home-page ".git"))
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
+ (janestreet-origin "stdio" version
+ "1hj5hraprqy2i90a690l11yjszvb99j818q3d684ryx6p2lddk0l"))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))))
- (arguments
- `(#:tests? #f ;no tests
- #:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
- (synopsis "Standard IO library for OCaml")
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)))
+ (arguments `(#:tests? #f))
+ (properties `((ocaml4.07-variant . ,(delay ocaml4.07-stdio))))
+ (synopsis
+ "Standard IO library for OCaml")
(description
"Stdio implements simple input/output functionalities for OCaml. It
re-exports the input/output functions of the OCaml standard libraries using
a more consistent API.")
(license license:expat)))
+(define-public ocaml4.07-stdio
+ (package-with-ocaml4.07
+ (package
+ (inherit ocaml-stdio)
+ (name "ocaml4.07-stdio")
+ (version "0.11.0")
+ (source
+ (janestreet-origin "stdio" version
+ "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))
+ (arguments
+ `(#:tests? #f ;no tests
+ #:ocaml ,ocaml-4.07
+ #:findlib ,ocaml4.07-findlib
+ #:dune ,ocaml4.07-dune))
+ (properties '()))))
+
(define-public ocaml-ppx-derivers
(package
(name "ocaml-ppx-derivers")
@@ -4414,7 +4421,7 @@ as part of the same ocaml-migrate-parsetree driver.")
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppx-derivers" ,(package-with-ocaml4.07 ocaml-ppx-derivers))
- ("ocaml-stdio" ,ocaml4.07-stdio)
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))))
(arguments
@@ -5041,9 +5048,9 @@ else expression.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-stdio" ,ocaml4.07-stdio)
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
+ ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
(properties `((upstream-name . "ppx_optcomp")))
(home-page "https://github.com/janestreet/ppx_optcomp")
(synopsis "Optional compilation for OCaml")
@@ -5162,20 +5169,20 @@ useful errors on failure.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
- ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
- ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
- ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
- ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
- ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
- ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
- ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
- ("ocaml-stdio" ,ocaml4.07-stdio)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)
- ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
+ ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
+ ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
+ ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
+ ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
+ ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
+ ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
+ ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,ocaml4.07-ppxlib)
+ ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))))
(properties `((upstream-name . "ppx_expect")))
(home-page "https://github.com/janestreet/ppx_expect")
(synopsis "Cram like framework for OCaml")
@@ -5446,8 +5453,8 @@ various Jane Street packages.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-stdio" ,ocaml4.07-stdio)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
(home-page "https://github.com/janestreet/configurator")
(synopsis "Helper library for gathering system configuration")
(description "Configurator is a small library that helps writing OCaml
@@ -5533,17 +5540,17 @@ thousands of times faster than fork.
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-configurator" ,ocaml4.07-configurator)
- ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
- ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
- ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
- ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))
- ("ocaml-spawn" ,ocaml4.07-spawn)
- ("ocaml-stdio" ,ocaml4.07-stdio)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-configurator" ,ocaml4.07-configurator)
+ ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
+ ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
+ ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
+ ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))
+ ("ocaml-spawn" ,ocaml4.07-spawn)
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
(home-page "https://github.com/janestreet/core")
(synopsis "Alternative to OCaml's standard library")
(description "The Core suite of libraries is an alternative to OCaml's
@@ -5573,25 +5580,25 @@ standard library that was developed by Jane Street.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
- ("ocaml-configurator" ,ocaml4.07-configurator)
- ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
- ("ocaml-jane-street-headers" ,ocaml4.07-jane-street-headers)
- ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
- ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
- ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
- ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
- ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
- ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
- ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
- ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))
- ("ocaml-splittable-random" ,ocaml4.07-splittable-random)
- ("ocaml-stdio" ,ocaml4.07-stdio)
- ("ocaml-typerep" ,ocaml4.07-typerep)
- ("ocaml-variantslib" ,ocaml4.07-variantslib)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
+ ("ocaml-configurator" ,ocaml4.07-configurator)
+ ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
+ ("ocaml-jane-street-headers" ,ocaml4.07-jane-street-headers)
+ ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
+ ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
+ ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
+ ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
+ ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
+ ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
+ ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
+ ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))
+ ("ocaml-splittable-random" ,ocaml4.07-splittable-random)
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
+ ("ocaml-typerep" ,ocaml4.07-typerep)
+ ("ocaml-variantslib" ,ocaml4.07-variantslib)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
(properties `((upstream-name . "core_kernel")))
(home-page "https://github.com/janestreet/core_kernel")
(synopsis "Portable standard library for OCaml")
@@ -5873,7 +5880,7 @@ library FFTW.")
`(("openblas" ,openblas)
("lapack" ,lapack)
("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-stdio" ,ocaml4.07-stdio)))
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
(home-page "https://mmottl.github.io/lacaml/")
(synopsis
"OCaml-bindings to BLAS and LAPACK")
--
2.29.2
[-- Attachment #4: 0003-gnu-add-ocaml-ppxlib.patch --]
[-- Type: text/x-patch, Size: 28658 bytes --]
From c08d0dc308c5dd429212c171b824135577e570ed Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 30 Dec 2020 19:05:34 +0100
Subject: [PATCH 3/5] gnu: add ocaml-ppxlib
* gnu/packages/ocaml.scm (ocaml-ppxlib): New variable.
(ocaml4.07-ppxlib): Inherit from ocaml-ppxlib.
---
gnu/packages/ocaml.scm | 356 ++++++++++++++++++++++++-----------------
1 file changed, 207 insertions(+), 149 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9e19772997..828dd6ff73 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3686,7 +3686,7 @@ syntax checking on dedukti files.")
("ocaml-compiler-libs" ,(package-with-ocaml4.07 ocaml-compiler-libs))
("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_inline_test")))
(synopsis "Syntax extension for writing in-line tests in ocaml code")
(description "This package contains a syntax extension for writing
@@ -4399,10 +4399,12 @@ ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
as part of the same ocaml-migrate-parsetree driver.")
(license license:bsd-3)))
-(define-public ocaml4.07-ppxlib
+(define-public ocaml-ppxlib
+ ;; Future versions are not compatible with ocaml-migrate-parsetree
+ ;; 1.7.3
(package
- (name "ocaml4.07-ppxlib")
- (version "0.6.0")
+ (name "ocaml-ppxlib")
+ (version "0.15.0")
(home-page "https://github.com/ocaml-ppx/ppxlib")
(source
(origin
@@ -4413,20 +4415,28 @@ as part of the same ocaml-migrate-parsetree driver.")
(file-name (git-file-name name version))
(sha256
(base32
- "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
+ "1p037kqj5858xrhh0dps6vbf4fnijla6z9fjz5zigvnqp4i2xkrn"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-compiler-libs" ,(package-with-ocaml4.07 ocaml-compiler-libs))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppx-derivers" ,(package-with-ocaml4.07 ocaml-ppx-derivers))
- ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
- ("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
- ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))))
+ `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
+ ("ocaml-compiler-libs" ,ocaml-compiler-libs)
+ ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
+ ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)))
+ (native-inputs
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-stdio" ,ocaml-stdio)))
+ (properties `((ocaml4.07-variant . ,(delay ocaml4.07-ppxlib))))
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-before 'build 'fix-deprecated
+ (lambda _
+ ;; Silence a deprecation warning
+ (substitute* "src/gen/dune"
+ (("-safe-string")
+ "-safe-string -w -3"))
+ #t))
(add-before 'check 'set-topfind
(lambda* (#:key inputs #:allow-other-keys)
;; add the line #directory ".." at the top of each file
@@ -4443,10 +4453,7 @@ as part of the same ocaml-migrate-parsetree driver.")
(("#use \"topfind\";;" all)
(string-append "#directory \"" findlib-libdir "\"\n"
all))))
- #t)))
- #:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
+ #t)))))
(synopsis
"Base library and tools for ppx rewriters")
(description
@@ -4464,6 +4471,57 @@ OCaml AST in the OCaml syntax;
@end itemize")
(license license:expat)))
+(define-public ocaml4.07-ppxlib
+ (package-with-ocaml4.07
+ (package
+ (inherit ocaml-ppxlib)
+ (name "ocaml4.07-ppxlib")
+ (version "0.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append (package-home-page ocaml-ppxlib)
+ ".git"))
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
+ (propagated-inputs
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-compiler-libs" ,(package-with-ocaml4.07 ocaml-compiler-libs))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppx-derivers" ,(package-with-ocaml4.07 ocaml-ppx-derivers))
+ ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
+ ("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
+ ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'set-topfind
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; add the line #directory ".." at the top of each file
+ ;; using #use "topfind";; to be able to find topfind
+ (let* ((findlib-path (assoc-ref inputs "findlib"))
+ (findlib-libdir
+ (string-append findlib-path "/lib/ocaml/site-lib")))
+ (substitute* '("test/base/test.ml"
+ "test/code_path/test.ml"
+ "test/deriving/test.ml"
+ "test/driver/attributes/test.ml"
+ "test/driver/non-compressible-suffix/test.ml"
+ "test/driver/transformations/test.ml")
+ (("#use \"topfind\";;" all)
+ (string-append "#directory \"" findlib-libdir "\"\n"
+ all))))
+ #t)))
+ #:ocaml ,ocaml-4.07
+ #:findlib ,ocaml4.07-findlib
+ #:dune ,ocaml4.07-dune))
+ (properties '()))))
+
(define-public ocaml4.07-ppx-compare
(package
(name "ocaml4.07-ppx-compare")
@@ -4479,10 +4537,10 @@ OCaml AST in the OCaml syntax;
"06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(arguments
`(#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
@@ -4518,10 +4576,10 @@ by making sure that you only compare comparable values.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "fieldslib")))
(home-page "https://github.com/janestreet/fieldslib")
(synopsis "Syntax extension to record fields")
@@ -4550,10 +4608,10 @@ of a record and create new record values.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "variantslib")))
(home-page "https://github.com/janestreet/variantslib")
(synopsis "OCaml variants as first class values")
@@ -4575,11 +4633,11 @@ standard library.")
"07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(arguments
`(#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
@@ -4608,10 +4666,10 @@ new record values.")
"0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(arguments
`(#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
@@ -4638,11 +4696,11 @@ definitions.")
"1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-variantslib" ,ocaml4.07-variantslib)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-variantslib" ,ocaml4.07-variantslib)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(arguments
`(#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
@@ -4671,11 +4729,11 @@ variant types.")
"11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(arguments
`(#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
@@ -4770,12 +4828,12 @@ storage of large amounts of data.")
"1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
- ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
+ ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(arguments
`(#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
@@ -4807,10 +4865,10 @@ hash functions from type exrpessions and definitions.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_enumerate")))
(home-page "https://github.com/janestreet/ppx_enumerate")
(synopsis "Generate a list containing all values of a finite type")
@@ -4839,10 +4897,10 @@ many values).")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_bench")))
(home-page "https://github.com/janestreet/ppx_bench")
(synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
@@ -4869,10 +4927,10 @@ many values).")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_here")))
(home-page "https://github.com/janestreet/ppx_here")
(synopsis "Expands [%here] into its location")
@@ -4922,12 +4980,12 @@ many values).")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
- ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
+ ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_sexp_value")))
(home-page "https://github.com/janestreet/ppx_sexp_value")
(synopsis "Simplify building s-expressions from ocaml values")
@@ -4953,12 +5011,12 @@ ocaml values.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
- ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
+ ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_sexp_message")))
(home-page "https://github.com/janestreet/ppx_sexp_message")
(synopsis "A ppx rewriter for easy construction of s-expressions")
@@ -4988,9 +5046,9 @@ context such as function arguments.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_pipebang")))
(home-page "https://github.com/janestreet/ppx_pipebang")
(synopsis "Inline reverse application operators `|>` and `|!`")
@@ -5018,10 +5076,10 @@ context such as function arguments.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_optional")))
(home-page "https://github.com/janestreet/ppx_optional")
(synopsis "Pattern matching on flat options")
@@ -5050,7 +5108,7 @@ else expression.")
(propagated-inputs
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_optcomp")))
(home-page "https://github.com/janestreet/ppx_optcomp")
(synopsis "Optional compilation for OCaml")
@@ -5077,10 +5135,10 @@ size, the version of the compiler, ...")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_let")))
(home-page "https://github.com/janestreet/ppx_let")
(synopsis "Monadic let-bindings")
@@ -5106,11 +5164,11 @@ match expressions, and if expressions.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_fail")))
(home-page "https://github.com/janestreet/ppx_fail")
(synopsis "Add location to calls to failwiths")
@@ -5136,13 +5194,13 @@ position.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
- ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
- ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
+ ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
+ ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_assert")))
(home-page "https://github.com/janestreet/ppx_assert")
(synopsis "Assert-like extension nodes that raise useful errors on failure")
@@ -5181,7 +5239,7 @@ useful errors on failure.")
("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))
("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))))
(properties `((upstream-name . "ppx_expect")))
(home-page "https://github.com/janestreet/ppx_expect")
@@ -5213,11 +5271,11 @@ to denote the expected output.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-octavius" ,(package-with-ocaml4.07 ocaml-octavius))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-octavius" ,(package-with-ocaml4.07 ocaml-octavius))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_js_style")))
(home-page "https://github.com/janestreet/ppx_js_style")
(synopsis "Code style checker for Jane Street Packages")
@@ -5246,11 +5304,11 @@ packages.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-typerep" ,ocaml4.07-typerep)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-typerep" ,ocaml4.07-typerep)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_typerep_conv")))
(home-page "https://github.com/janestreet/ppx_typerep_conv")
(synopsis "Generation of runtime types from type declarations")
@@ -5277,14 +5335,14 @@ from type definitions.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
- ("ocaml-ppx-enumerate" ,ocaml4.07-ppx-enumerate)
- ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
- ("ocaml-ppx-js-style" ,ocaml4.07-ppx-js-style)
- ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
+ ("ocaml-ppx-enumerate" ,ocaml4.07-ppx-enumerate)
+ ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
+ ("ocaml-ppx-js-style" ,ocaml4.07-ppx-js-style)
+ ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_base")))
(home-page "https://github.com/janestreet/ppx_base")
(synopsis "Base set of ppx rewriters")
@@ -5315,12 +5373,12 @@ verification tool.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
- ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
+ ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
+ ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_bin_prot")))
(home-page "https://github.com/janestreet/ppx_bin_prot")
(synopsis "Generation of bin_prot readers and writers from types")
@@ -5347,27 +5405,27 @@ functions from type definitions.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
- ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
- ("ocaml-ppx-bench" ,ocaml4.07-ppx-bench)
- ("ocaml-ppx-bin-prot" ,ocaml4.07-ppx-bin-prot)
- ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
- ("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)
- ("ocaml-ppx-fail" ,ocaml4.07-ppx-fail)
- ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
- ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
- ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
- ("ocaml-ppx-let" ,ocaml4.07-ppx-let)
- ("ocaml-ppx-optcomp" ,ocaml4.07-ppx-optcomp)
- ("ocaml-ppx-optional" ,ocaml4.07-ppx-optional)
- ("ocaml-ppx-pipebang" ,ocaml4.07-ppx-pipebang)
- ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
- ("ocaml-ppx-sexp-value" ,ocaml4.07-ppx-sexp-value)
- ("ocaml-ppx-typerep-conv" ,ocaml4.07-ppx-typerep-conv)
- ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ `(("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
+ ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
+ ("ocaml-ppx-bench" ,ocaml4.07-ppx-bench)
+ ("ocaml-ppx-bin-prot" ,ocaml4.07-ppx-bin-prot)
+ ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
+ ("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)
+ ("ocaml-ppx-fail" ,ocaml4.07-ppx-fail)
+ ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
+ ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
+ ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
+ ("ocaml-ppx-let" ,ocaml4.07-ppx-let)
+ ("ocaml-ppx-optcomp" ,ocaml4.07-ppx-optcomp)
+ ("ocaml-ppx-optional" ,ocaml4.07-ppx-optional)
+ ("ocaml-ppx-pipebang" ,ocaml4.07-ppx-pipebang)
+ ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
+ ("ocaml-ppx-sexp-value" ,ocaml4.07-ppx-sexp-value)
+ ("ocaml-ppx-typerep-conv" ,ocaml4.07-ppx-typerep-conv)
+ ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
+ ("ocaml-migrate-parsetree"
+ ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(properties `((upstream-name . "ppx_jane")))
(home-page "https://github.com/janestreet/ppx_jane")
(synopsis "Standard Jane Street ppx rewriters")
@@ -5550,7 +5608,7 @@ thousands of times faster than fork.
("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
+ ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
(home-page "https://github.com/janestreet/core")
(synopsis "Alternative to OCaml's standard library")
(description "The Core suite of libraries is an alternative to OCaml's
--
2.29.2
[-- Attachment #5: 0004-gnu-Add-ocaml-graphics.patch --]
[-- Type: text/x-patch, Size: 1685 bytes --]
From c53824f13472d91cd7087e965976876725164e66 Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 30 Dec 2020 19:06:57 +0100
Subject: [PATCH 4/5] gnu: Add ocaml-graphics
---
gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 828dd6ff73..353394e4d4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6148,3 +6148,32 @@ 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 chooses the concrete timeline.")
(license license:lgpl2.1+)))
+
+(define-public ocaml-graphics
+ (package
+ (name "ocaml-graphics")
+ (version "5.1.0")
+ (home-page "https://github.com/ocaml/graphics")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append home-page ".git"))
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1ilw5r1lpy88fpfcpifxxbdg74f468jb5xhimw92iwmr410gnqp2"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ `(("dune-configurator" ,dune-configurator)
+ ("libx11" ,libx11)
+ ("pkg-config" ,pkg-config)))
+ (synopsis "The OCaml graphics library")
+ (description
+ "The graphics library provides a set of portable drawing
+primitives. Drawing takes place in a separate window that is created
+when Graphics.open_graph is called.
+
+This library used to be distributed with OCaml up to OCaml 4.08.")
+ (license license:lgpl2.1+)))
--
2.29.2
[-- Attachment #6: 0005-gnu-Add-ocaml-js-of-ocaml.patch --]
[-- Type: text/x-patch, Size: 1940 bytes --]
From 151ffb96657268adf40103d8c4aac04f4d3a61fb Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 30 Dec 2020 19:08:57 +0100
Subject: [PATCH 5/5] gnu: Add ocaml-js-of-ocaml
---
gnu/packages/ocaml.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 353394e4d4..ce1d09f936 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6177,3 +6177,41 @@ when Graphics.open_graph is called.
This library used to be distributed with OCaml up to OCaml 4.08.")
(license license:lgpl2.1+)))
+
+(define-public ocaml-js-of-ocaml
+ (package
+ (name "ocaml-js-of-ocaml")
+ (version "3.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocsigen/js_of_ocaml")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1ls3nhavhifsfwwz45k4xw91ml9zi6rnkfp3175b2havbavbzral"))))
+ (build-system dune-build-system)
+ (arguments `(#:tests? #f))
+ (propagated-inputs
+ `(("ocaml-ppxlib" ,ocaml-ppxlib)
+ ("ocaml-uchar" ,ocaml-uchar)
+ ("ocaml-menhir" ,ocaml-menhir)
+ ("ocaml-reactivedata" ,ocaml-reactivedata)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-tyxml" ,ocaml-tyxml)
+ ("ocaml-re" ,ocaml-re)
+ ("ocaml-uutf" ,ocaml-uutf)
+ ("ocaml-graphics" ,ocaml-graphics)))
+ (properties `((upstream-name . "js_of_ocaml")))
+ (home-page
+ "http://ocsigen.github.io/js_of_ocaml")
+ (synopsis
+ "Compiler from OCaml bytecode to Javascript")
+ (description
+ "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
+It makes it possible to run pure OCaml programs in JavaScript
+environment like browsers and Node.js
+")
+ (license license:lgpl2.1+)))
--
2.29.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#45558] [PATCH] Add js_of_ocaml
2020-12-30 19:22 [bug#45558] [PATCH] Add js_of_ocaml divoplade
@ 2021-05-03 12:38 ` pukkamustard
2021-05-04 9:10 ` [bug#47769] " divoplade
0 siblings, 1 reply; 4+ messages in thread
From: pukkamustard @ 2021-05-03 12:38 UTC (permalink / raw)
To: divoplade; +Cc: 45558, 47769
[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]
Hi divoplade,
divoplade <d@divoplade.fr> writes:
> I finally got js_of_ocaml packaged.
Thank you!
> I'm not sure I did everything correctly (especially indentation
There do seem to be some indentation issues. Have you seen the
section "Formatting Code" in the Guix manual? There is also a
little script in the guix repository that will automatically
indent a package definition.
Also your commit logs don't seem to be exactly in the required
format. For example: "gnu: add ocaml-ppxlib" should be "gnu: Add
ocaml-ppxlib.". Check the section "Submitting Patches" in the Guix
manual and also the commit history for examples.
There are also some things that the linter discovers. For example
you can omit the ".git" suffix for GitHub sources or that
pkg-config is not needed in ocaml-graphics. You can run `git lint
PACKAGE` too see what the linter has to say (and maybe should do
that for modified package definitions).
> , but also how to make non-4.07 packages
This looks ok.
I submitted a series of patches that does this for many OCaml
packages including the ones included in your series
(https://issues.guix.gnu.org/47768). I'm sorry I should have
included your work in my patch series instead of duplicating.
Maybe a small difference is that the patches in #47769 include a
more recent version of ocaml-ppxlib (and the required version of
ocaml-migrate-parsetree).
I have updated your patches for ocaml-graphics and js_of_ocaml so
that they can be applied on #47769. Some changes in the attached
patches:
ocaml-graphics:
- Use version 5.1.1 instead of 5.1.0 (5.1.1 was released after you
submitted the patches)
- Remove unnecessary inputs
- Change git-reference url to homepage (GitHub without the ".git"
suffix)
- Minor changes to description too make linter happy
ocaml-js-of-ocaml:
- Set home-page to https://ocsigen.org/js_of_ocaml/
- Use version 3.9.0 instead of 3.8.0 (again released after you
submitted the patches)
- Enable source maps by including ocaml-yojson as input
- Enable tests (this requires ocaml-ppx-expect,
ocaml-ppx-variants-conv, ocaml-variantslib and an updated
version of ocaml-num)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-ocaml-graphics.patch --]
[-- Type: text/x-patch, Size: 1710 bytes --]
From ef943e9e01e979a3de7c84d88d5f8d3d6535da9a Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 30 Dec 2020 19:06:57 +0100
Subject: [PATCH 1/6] gnu: Add ocaml-graphics.
* gnu/packages/ocaml.scm (ocaml-graphics): New variable.
Co-Authored-By: pukkamustard <pukkamustard@posteo.net>
---
gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c390a8bce9..4727b294d9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6900,3 +6900,29 @@ Both interfaces give the user total control over the blocking behavior of
their application, with the unbuffered interface enabling zero-copy IO.
Parsers are backtracking by default and support unbounded lookahead.")
(license license:bsd-3)))
+
+(define-public ocaml-graphics
+ (package
+ (name "ocaml-graphics")
+ (version "5.1.1")
+ (home-page "https://github.com/ocaml/graphics")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "14w07ydji2nbdk366nfp2pzs9484xp9vqv63n345id13v48z8bfi"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ `(("libx11" ,libx11)))
+ (synopsis "The OCaml graphics library")
+ (description
+ "The graphics library provides a set of portable drawing primitives.
+Drawing takes place in a separate window that is created when
+Graphics.open_graph is called. This library used to be distributed with OCaml
+up to OCaml 4.08.")
+ (license license:lgpl2.1+)))
--
2.31.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-ocaml-variantslib.patch --]
[-- Type: text/x-patch, Size: 4271 bytes --]
From 96f9bb75aa9a401f353619d112e414eab2745db1 Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
Date: Mon, 3 May 2021 22:49:23 +0200
Subject: [PATCH 2/6] gnu: Add ocaml-variantslib.
* gnu/packages/ocaml.scm (ocaml-variantslib): New variable.
(ocaml4.07-variantslib): Inherit from ocaml-variantslib.
---
gnu/packages/ocaml.scm | 52 ++++++++++++++++++++++++------------------
1 file changed, 30 insertions(+), 22 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4727b294d9..e40bc78db2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5137,37 +5137,45 @@ of a record and create new record values.")
"12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))
(properties `((upstream-name . "fieldslib"))))))
-(define-public ocaml4.07-variantslib
+(define-public ocaml-variantslib
(package
- (name "ocaml4.07-variantslib")
- (version "0.11.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
- (version-major+minor version)
- "/files/variantslib-v" version ".tar.gz"))
- (sha256
- (base32
- "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
+ (name "ocaml-variantslib")
+ (version "0.14.0")
+ (source
+ (janestreet-origin "variantslib" version
+ "11zp27gh282dx9ifbhcp6i7fkc97fvk8amaj58mf1g1hwklc0lm3"))
(build-system dune-build-system)
(arguments
;; No tests
- `(#:tests? #f
- #:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
+ `(#:tests? #f))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
- (properties `((upstream-name . "variantslib")))
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)))
+ (properties `((upstream-name . "variantslib")
+ (ocaml4.07-variant . ,(delay ocaml4.07-variantslib))))
(home-page "https://github.com/janestreet/variantslib")
(synopsis "OCaml variants as first class values")
(description "The Core suite of libraries is an alternative to OCaml's
standard library.")
(license license:asl2.0)))
+(define-public ocaml4.07-variantslib
+ (package-with-ocaml4.07
+ (package
+ (inherit ocaml-variantslib)
+ (name "ocaml-variantslib")
+ (version "0.11.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
+ (version-major+minor version)
+ "/files/variantslib-v" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
+ (properties `((upstream-name . "variantslib"))))))
+
(define-public ocaml-ppx-fields-conv
(package
(name "ocaml-ppx-fields-conv")
@@ -5268,7 +5276,7 @@ definitions.")
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-variantslib" ,ocaml4.07-variantslib)
+ ("ocaml-variantslib" ,(package-with-ocaml4.07 ocaml-variantslib))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
@@ -6312,7 +6320,7 @@ standard library that was developed by Jane Street.")
("ocaml-splittable-random" ,ocaml4.07-splittable-random)
("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
("ocaml-typerep" ,ocaml4.07-typerep)
- ("ocaml-variantslib" ,ocaml4.07-variantslib)
+ ("ocaml-variantslib" ,(package-with-ocaml4.07 ocaml-variantslib))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
(properties `((upstream-name . "core_kernel")))
--
2.31.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-ocaml-ppx-variants-conv.patch --]
[-- Type: text/x-patch, Size: 5317 bytes --]
From 4753a6bf81c13af58a866782c8b63bbf035c9bd3 Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
Date: Mon, 3 May 2021 22:42:10 +0200
Subject: [PATCH 3/6] gnu: Add ocaml-ppx-variants-conv.
* gnu/packages/ocaml.scm (ocaml-ppx-variants-conv): New variable.
(ocaml4.07-ppx-variants-conv): Inherit from ocaml-ppx-variants-conv.
---
gnu/packages/ocaml.scm | 65 ++++++++++++++++++++++++++----------------
1 file changed, 40 insertions(+), 25 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e40bc78db2..019bfea9f9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5260,32 +5260,29 @@ definitions.")
"0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
(properties `((upstream-name . "ppx_sexp_conv"))))))
-(define-public ocaml4.07-ppx-variants-conv
+(define-public ocaml-ppx-variants-conv
(package
- (name "ocaml4.07-ppx-variants-conv")
- (version "0.11.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/janestreet/ppx_variants_conv")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
+ (name "ocaml-ppx-variants-conv")
+ (version "0.14.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/janestreet/ppx_variants_conv")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0q6a43zrwqzdz7aja0k44a2llyjjj5xzi2kigwhsnww3g0r5ig84"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-variantslib" ,(package-with-ocaml4.07 ocaml-variantslib))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
- (arguments
- `(#:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-variantslib" ,ocaml-variantslib)
+ ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)))
(properties
- `((upstream-name . "ppx_variants_conv")))
+ `((upstream-name . "ppx_variants_conv")
+ (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv))))
(home-page
"https://github.com/janestreet/ppx_variants_conv")
(synopsis "Generation of accessor and iteration functions for OCaml variant types")
@@ -5294,6 +5291,24 @@ definitions.")
variant types.")
(license license:asl2.0)))
+(define-public ocaml4.07-ppx-variants-conv
+ (package-with-ocaml4.07
+ (package
+ (inherit ocaml-ppx-variants-conv)
+ (name "ocaml-ppx-variants-conv")
+ (version "0.11.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/janestreet/ppx_variants_conv")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
+ (properties `((upstream-name . "ppx_variants_conv"))))))
+
(define-public ocaml-ppx-custom-printf
(package
(name "ocaml-ppx-custom-printf")
@@ -5352,7 +5367,7 @@ string conversion.")
("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf))
("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv))
("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
- ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
+ ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
(arguments
@@ -5888,7 +5903,7 @@ useful errors on failure.")
("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
("ocaml-ppx-inline-test" ,(package-with-ocaml4.07 ocaml-ppx-inline-test))
("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
- ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
+ ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv))
("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
@@ -6088,7 +6103,7 @@ functions from type definitions.")
("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
("ocaml-ppx-sexp-value" ,ocaml4.07-ppx-sexp-value)
("ocaml-ppx-typerep-conv" ,ocaml4.07-ppx-typerep-conv)
- ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
+ ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
--
2.31.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-Add-ocaml-ppx-expect.patch --]
[-- Type: text/x-patch, Size: 6243 bytes --]
From 332c6ce5b26127f2f324a46489e4c01181de2e57 Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
Date: Mon, 3 May 2021 22:32:27 +0200
Subject: [PATCH 4/6] gnu: Add ocaml-ppx-expect.
* gnu/packages/ocaml.scm (ocaml-ppx-expect): New variable.
(ocaml4.07-ppx-expect): Inherit from ocaml-ppx-expect.
---
gnu/packages/ocaml.scm | 83 +++++++++++++++++++++++++-----------------
1 file changed, 49 insertions(+), 34 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 019bfea9f9..c4a024c850 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3791,7 +3791,7 @@ library is currently designed for Unicode Standard 3.2.")
`(("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))))
(native-inputs
- `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)))
+ `(("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect))))
(properties
`((upstream-name . "charInfo_width")))
(home-page "https://bitbucket.org/zandoye/charinfo_width/")
@@ -5876,40 +5876,31 @@ useful errors on failure.")
("ocaml-ppxlib" ,ocaml-ppxlib)))
(properties `((upstream-name . "ppx_assert"))))))
-(define-public ocaml4.07-ppx-expect
+(define-public ocaml-ppx-expect
(package
- (name "ocaml4.07-ppx-expect")
- (version "0.12.0")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/janestreet/ppx_expect")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q"))))
+ (name "ocaml-ppx-expect")
+ (version "0.14.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/janestreet/ppx_expect")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vbbnjrzpyk5p0js21lafr6fcp2wqka89p1876rdf472cmg0l7fv"))))
(build-system dune-build-system)
- (arguments
- `(#:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
(propagated-inputs
- `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
- ("ocaml-ppx-assert" ,(package-with-ocaml4.07 ocaml4.07-ppx-assert))
- ("ocaml-ppx-compare" ,(package-with-ocaml4.07 ocaml-ppx-compare))
- ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf))
- ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv))
- ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
- ("ocaml-ppx-inline-test" ,(package-with-ocaml4.07 ocaml-ppx-inline-test))
- ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
- ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv))
- ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))
- ("ocaml-migrate-parsetree"
- ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
- ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))
- ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))))
- (properties `((upstream-name . "ppx_expect")))
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-ppx-here" ,ocaml-ppx-here)
+ ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
+ ("ocaml-stdio" ,ocaml-stdio)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)
+ ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+ ("ocaml-re" ,ocaml-re)))
+ (properties `((upstream-name . "ppx_expect")
+ (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect))))
(home-page "https://github.com/janestreet/ppx_expect")
(synopsis "Cram like framework for OCaml")
(description "Expect-test is a framework for writing tests in OCaml, similar
@@ -5919,6 +5910,30 @@ output-generating code, interleaved with @code{%expect} extension expressions
to denote the expected output.")
(license license:asl2.0)))
+(define-public ocaml4.07-ppx-expect
+ (package-with-ocaml4.07
+ (package
+ (inherit ocaml-ppx-expect)
+ (version "0.12.0")
+ (source
+ (janestreet-origin "ppx_expect" version
+ "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk"))
+ (propagated-inputs
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-ppx-assert" ,ocaml-ppx-assert)
+ ("ocaml-ppx-compare" ,ocaml-ppx-compare)
+ ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
+ ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
+ ("ocaml-ppx-here" ,ocaml-ppx-here)
+ ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
+ ("ocaml-stdio" ,ocaml-stdio)
+ ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)
+ ("ocaml-re" ,ocaml-re)))
+ (properties `((upstream-name . "ppx_expect"))))))
+
(define-public ocaml-ppx-js-style
(package
(name "ocaml-ppx-js-style")
@@ -6091,7 +6106,7 @@ functions from type definitions.")
("ocaml-ppx-bench" ,ocaml4.07-ppx-bench)
("ocaml-ppx-bin-prot" ,ocaml4.07-ppx-bin-prot)
("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf))
- ("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)
+ ("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect))
("ocaml-ppx-fail" ,ocaml4.07-ppx-fail)
("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv))
("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
@@ -6236,7 +6251,7 @@ Configurator allows one to:
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(native-inputs
- `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)))
+ `(("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect))))
(home-page "https://github.com/janestreet/spawn")
(synopsis "Spawning sub-processes")
(description
--
2.31.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-gnu-ocaml-num-Update-to-1.4.patch --]
[-- Type: text/x-patch, Size: 2508 bytes --]
From ac57c989bb2dab51e45561c3faeed8ef5a52cb3a Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
Date: Tue, 4 May 2021 07:58:43 +0200
Subject: [PATCH 5/6] gnu: ocaml-num: Update to 1.4.
* gnu/packages/ocaml.scm (ocaml-num): Update to 1.4.
---
gnu/packages/ocaml.scm | 31 +++----------------------------
1 file changed, 3 insertions(+), 28 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c4a024c850..349124c99e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -958,7 +958,7 @@ written in Objective Caml.")
(define-public ocaml-num
(package
(name "ocaml-num")
- (version "1.1")
+ (version "1.4")
(source
(origin
(method git-fetch)
@@ -967,33 +967,8 @@ written in Objective Caml.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0a4mhxgs5hi81d227aygjx35696314swas0vzy3ig809jb7zq4h0"))))
- (build-system ocaml-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'fix-makefile
- (lambda* (#:key outputs #:allow-other-keys)
- ;; This package supposes we install to the same directory as
- ;; the ocaml package.
- (substitute* "src/META"
- (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out")
- "/lib/ocaml/site-lib\"")))
- (substitute* "src/Makefile"
- (("\\) \\$\\(STDLIBDIR\\)")
- (string-append ") " (assoc-ref outputs "out")
- "/lib/ocaml/site-lib")))
- #t))
- (add-after 'install 'fix-stubslib
- (lambda* (#:key outputs #:allow-other-keys)
- (format #t "~a~%" (find-files "." ".*.so"))
- (let ((stubdir (string-append (assoc-ref outputs "out")
- "/lib/ocaml/site-lib/stublibs")))
- (delete-file stubdir)
- (mkdir-p stubdir)
- (install-file "src/dllnums.so" stubdir))
- #t)))))
+ (base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc"))))
+ (build-system dune-build-system)
(home-page "https://github.com/ocaml/num")
(synopsis "Arbitrary-precision integer and rational arithmetic")
(description "OCaml-Num contains the legacy Num library for
--
2.31.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-gnu-Add-ocaml-js-of-ocaml.patch --]
[-- Type: text/x-patch, Size: 2573 bytes --]
From 7a19c648423b31d2322a86dc762dd01e39c417c0 Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 30 Dec 2020 19:08:57 +0100
Subject: [PATCH 6/6] gnu: Add ocaml-js-of-ocaml.
* gnu/packages/ocaml.scm (ocaml-js-of-ocaml): New variable.
Co-Authored-By: pukkamustard <pukkamustard@posteo.net>
---
gnu/packages/ocaml.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 349124c99e..24d9e814fa 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -61,6 +61,7 @@
#:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages node)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
@@ -6939,3 +6940,43 @@ Drawing takes place in a separate window that is created when
Graphics.open_graph is called. This library used to be distributed with OCaml
up to OCaml 4.08.")
(license license:lgpl2.1+)))
+
+(define-public ocaml-js-of-ocaml
+ (package
+ (name "ocaml-js-of-ocaml")
+ (version "3.9.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocsigen/js_of_ocaml")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "00hdjaj94j3nc6f6wbbpx59h4yc79siphs34i1hry11r56paaqyk"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ppxlib" ,ocaml-ppxlib)
+ ("ocaml-uchar" ,ocaml-uchar)
+ ("ocaml-menhir" ,ocaml-menhir)
+ ("ocaml-reactivedata" ,ocaml-reactivedata)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-tyxml" ,ocaml-tyxml)
+ ("ocaml-re" ,ocaml-re)
+ ("ocaml-uutf" ,ocaml-uutf)
+ ("ocaml-graphics" ,ocaml-graphics)
+ ("ocaml-yojson" ,ocaml-yojson)))
+ (native-inputs
+ ;; for tests
+ `(("node" ,node)
+ ("ocaml-ppx-expect" ,ocaml-ppx-expect)
+ ("ocaml-num" ,ocaml-num)))
+ (properties `((upstream-name . "js_of_ocaml")))
+ (home-page "https://ocsigen.org/js_of_ocaml/")
+ (synopsis "Compiler from OCaml bytecode to Javascript")
+ (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
+It makes it possible to run pure OCaml programs in JavaScript environment like
+browsers and Node.js.")
+ (license license:lgpl2.1+)))
--
2.31.1
[-- Attachment #8: Type: text/plain, Size: 28 bytes --]
Best regards,
pukkamustard
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#47769] [bug#45558] [PATCH] Add js_of_ocaml
2021-05-03 12:38 ` pukkamustard
@ 2021-05-04 9:10 ` divoplade
2021-05-10 5:18 ` [bug#47768] " pukkamustard
0 siblings, 1 reply; 4+ messages in thread
From: divoplade @ 2021-05-04 9:10 UTC (permalink / raw)
To: pukkamustard; +Cc: 45558, 47769
Hello,
Thank you for the interest in this issue. I realize I opened it at a
rather inconvenient time, so I guess it ended up on the bottom of the
pile for quite some time.
Le lundi 03 mai 2021 à 12:38 +0000, pukkamustard a écrit :
> I submitted a series of patches that does this for many OCaml
> packages including the ones included in your series
> (https://issues.guix.gnu.org/47768).
The situation is quite complex to me, please bear with me. If I
understand correctly, you pushed a lot of ocaml updates last month,
making some of the changes I made in december somewhat obsolete. Right?
So, now, I should your modified 5 patches in this issue on top of the
37 patches in the other issue to get js-of-ocaml. Is it correct?
At this rate, if it is possible, maybe you could just append these 5 to
the other issue, it would be easier to track.
What do you think?
I didn’t detect indentation problems by running ./etc/indent-code.el;
even if other packages in the module have some indentation problems.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#47768] [bug#45558] [PATCH] Add js_of_ocaml
2021-05-04 9:10 ` [bug#47769] " divoplade
@ 2021-05-10 5:18 ` pukkamustard
0 siblings, 0 replies; 4+ messages in thread
From: pukkamustard @ 2021-05-10 5:18 UTC (permalink / raw)
To: divoplade; +Cc: 45558-done, 47768
Hi divoplade,
divoplade <d@divoplade.fr> writes:
[...]
> So, now, I should your modified 5 patches in this issue on top
> of the
> 37 patches in the other issue to get js-of-ocaml. Is it correct?
>
> At this rate, if it is possible, maybe you could just append
> these 5 to
> the other issue, it would be easier to track.
>
> What do you think?
Yeah, that makes sense. I just submitted a V2 of #47768
(https://issues.guix.gnu.org/47768) that includes your patches for
js_of_ocaml, merging the issues.
Closing this issue in favor of #47769.
-pukkamustard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-10 5:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-30 19:22 [bug#45558] [PATCH] Add js_of_ocaml divoplade
2021-05-03 12:38 ` pukkamustard
2021-05-04 9:10 ` [bug#47769] " divoplade
2021-05-10 5:18 ` [bug#47768] " pukkamustard
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).