[bug#34265,2/9] gnu: sexplib0: Update to 0.12-preview.120.18+252.

Message ID 874l9oycqm.fsf@gmail.com
State Accepted
Headers show
Series [bug#34265,1/9] gnu: dune: Update to 1.6.3. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Gabriel Hondet Jan. 31, 2019, 4:20 p.m. UTC
* gnu/packages/ocaml.scm (sexplib0): Update to 0.12-preview.120.18+252.
---
 gnu/packages/ocaml.scm | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

Comments

Julien Lepiller Jan. 31, 2019, 5:28 p.m. UTC | #1
Le 31 janvier 2019 17:20:24 GMT+01:00, Gabriel Hondet <gabrielhondet@gmail.com> a écrit :
>
>* gnu/packages/ocaml.scm (sexplib0): Update to 0.12-preview.120.18+252.
>---
> gnu/packages/ocaml.scm | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
>diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>index 986e435f4..5f95591d9 100644
>--- a/gnu/packages/ocaml.scm
>+++ b/gnu/packages/ocaml.scm
>@@ -4903,27 +4903,37 @@ exclusion algorithms are typical examples of
>such systems.")
> (define-public ocaml-sexplib0
>   (package
>     (name "ocaml-sexplib0")
>-    (version "0.11.0")
>+    (version "0.12-preview.120.18+252")
>     (home-page "https://github.com/janestreet/sexplib0")
>     (source
>      (origin
>        (method git-fetch)
>        (uri (git-reference
>              (url (string-append home-page ".git"))
>-             (commit (string-append "v" version))))
>+             (commit "7e602a00a9b7c037f3717cc60577a2aad8941830")))
>        (file-name (git-file-name name version))
>        (sha256
>         (base32
>-         "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
>+         "0hrxy52nbnrd9l9v66klghsdy7xnbsjk85fb1rdkhcjcr38jnmad"))))
>     (build-system dune-build-system)
>     (arguments
>-     '(#:tests? #f)) ;no tests
>+     '(#:tests? #f ;no tests
>+       #:phases
>+       (modify-phases %standard-phases
>+         (replace 'install
>+           (lambda* (#:key outputs #:allow-other-keys)
>+             (invoke "dune" "install"
>+                     (string-append "--libdir="
>+                                    (assoc-ref outputs "out")
>+                                    "/lib/ocaml/site-lib")
>+                     (string-append "--prefix="
>+                                    (assoc-ref outputs "out"))))))))
> (synopsis "Library containing the definition of S-expressions and some
> base converters")
>     (description "Part of Jane Street's Core library The Core suite of
>libraries is an industrial strength alternative to OCaml's standard
>library
>that was developed by Jane Street, the largest industrial user of
>OCaml.")
>-(license license:expat)))
>+    (license license:expat)))
> 
> (define-public ocaml-parsexp
>   (package

Hi Gabriel, thanks for these patches!

We usually don't use beta,preview or otherwise unreleased software in guix. The opam website still has 0.11.0 as the latest version. What's the reason behind this change?

Tge libdir thing is worrying. Is it now needed with newer versions of dune? Shouldn't we rather modify the dure-build-system?

These questions apply to other packages in the series, so I'll refrain from pushing anything for now.
Gabriel Hondet Jan. 31, 2019, 5:49 p.m. UTC | #2
Hi Julien,

On Thu 31 Jan 2019 at 18:28 Julien Lepiller wrote:

> We usually don't use beta,preview or otherwise unreleased software in guix. The opam website still has 0.11.0 as the latest version. What's the reason behind this change?

Some packages still use jbuilder things and other use dune ones in the
0.11.x versions of jane street packages.  It resulted in errors with, for
instance ppxlib, who kept files in jbuilder syntax (although the file
was named ppxlib.dune).  In the 0.12 preview, everything uses dune.

> Tge libdir thing is worrying.

Concerning the =libdir=, it seems that Jane Street installs by default
everything to e.g. =lib/sexplib0/= directly (or =lib/ocaml/sexplib0= I
don't remember), but not in =lib/ocaml/site-lib/=, resulting in
libraries not found.

> Is it now needed with newer versions of dune? 

Curiously, this was already an issue, as the ~janestreet-origin~
function shows in =ocaml.scm= but it disappeared in the 0.10/0.11
series, as I packaged ~ocaml-sexplib0~ &c. without any issue; and it
reappeared when upgrading dune to 1.6.3.  So it seems that it is needed
with the new version of dune.

> Shouldn't we rather modify the dure-build-system?

It would seem to be a better idea.  I can give it a try.

> These questions apply to other packages in the series, so I'll refrain from pushing anything for now.

Indeed.

Gabriel
Gabriel Hondet Feb. 1, 2019, 8:22 a.m. UTC | #3
Hello,

On Thu 31 Jan 2019 at 18:49 Gabriel Hondet wrote:

>> Tge libdir thing is worrying.
>
> Concerning the =libdir=, it seems that Jane Street installs by default
> everything to e.g. =lib/sexplib0/= directly (or =lib/ocaml/sexplib0= I
> don't remember), but not in =lib/ocaml/site-lib/=, resulting in
> libraries not found.

The new behaviour of dune is to follow the prefix given, see
[[https://dune.readthedocs.io/en/latest/usage.html#destination]].
As the prefix is given, findlib is not consulted and everything is
installed directly into =out/lib=.

So I guess we have to add the flag ~--libdir=(string-append (assoc-ref
%outputs "out") "/lib/ocaml/site-lib/")~ during the install phase

Or we can keep the installation process but modify the OCAMLPATH
variable to search not in =lib/ocaml/site-lib= but in =lib/=.

Gabriel
Julien Lepiller Feb. 4, 2019, 9:12 p.m. UTC | #4
Pushed as 625a3daa12217d7cd162149dcba5657237bb9455 and following. Thank
you!

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 986e435f4..5f95591d9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4903,27 +4903,37 @@  exclusion algorithms are typical examples of such systems.")
 (define-public ocaml-sexplib0
   (package
     (name "ocaml-sexplib0")
-    (version "0.11.0")
+    (version "0.12-preview.120.18+252")
     (home-page "https://github.com/janestreet/sexplib0")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url (string-append home-page ".git"))
-             (commit (string-append "v" version))))
+             (commit "7e602a00a9b7c037f3717cc60577a2aad8941830")))
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
+         "0hrxy52nbnrd9l9v66klghsdy7xnbsjk85fb1rdkhcjcr38jnmad"))))
     (build-system dune-build-system)
     (arguments
-     '(#:tests? #f)) ;no tests
+     '(#:tests? #f ;no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "dune" "install"
+                     (string-append "--libdir="
+                                    (assoc-ref outputs "out")
+                                    "/lib/ocaml/site-lib")
+                     (string-append "--prefix="
+                                    (assoc-ref outputs "out"))))))))
     (synopsis "Library containing the definition of S-expressions and some
 base converters")
     (description "Part of Jane Street's Core library The Core suite of
 libraries is an industrial strength alternative to OCaml's standard library
 that was developed by Jane Street, the largest industrial user of OCaml.")
-(license license:expat)))
+    (license license:expat)))
 
 (define-public ocaml-parsexp
   (package