From: Vivien Kraus via Guix-patches via <guix-patches@gnu.org>
To: 69677@debbugs.gnu.org
Cc: rg@raghavgururajan.name, vivien@planete-kraus.eu,
liliana.prikler@gmail.com, maxim.cournoyer@gmail.com
Subject: [bug#69677] [PATCH gnome-team 1/1] gnu: opam: Fix build.
Date: Sat, 9 Mar 2024 10:46:18 +0100 [thread overview]
Message-ID: <3a4e1befc3e3da925fccec1d88f53fff1ffff83b.1709986125.git.vivien@planete-kraus.eu> (raw)
In-Reply-To: <cover.1709986125.git.vivien@planete-kraus.eu>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2673 bytes --]
* gnu/packages/ocaml.scm (ocaml-opam-core) [#:phases]: Add 'always-use-base64-compat-5'.
Change-Id: I8d9aec14ca2af92b9a4ac346ac57c22e6b76c716
---
Sorry, I messed up my cover letter, so it was not delivered to you.
Here it is:
Dear Guix,
For some unknown reason, opam on master decides that the ocaml base64 library
is not installed well enough to use it, but on gnome-team, it seems that it
does.
Opam can adapt to both cases, by using a different compatibility layer in
each. On master, it uses the compatibility layer version 5, and on
gnome-team, the compatibility layer version 6.
However, the compatibility layer version 6 does not work. An easy fix is to
force opam to use compatibility layer version 5 every time.
I am not proud of my regular expressions, but I couldn’t find a way to
factorize the optional `i` so that it matches either .ml or .mli.
Best regards,
Vivien
gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0f4c351141..5051524a53 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -854,6 +854,26 @@ (define ocaml-opam-core
#:tests? #f
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'always-use-base64-compat-5
+ (lambda _
+ (call-with-input-file "src/client/dune"
+ (lambda (port)
+ (display "ok")
+ (newline)))
+ ;; By default, the opamBase64Compat module will be
+ ;; compatibility version 6, which is just an empty
+ ;; file. Opam-client cannot build with an empty file.
+ (substitute* "src/client/dune"
+ (("opamBase64Compat\\.ml\\.6")
+ "opamBase64Compat.ml.5")
+ (("opamBase64Compat\\.mli\\.6")
+ "opamBase64Compat.mli.5")
+ ;; Undo the change in the rule to generate the .6
+ ;; files
+ (("with-stdout-to opamBase64Compat\\.ml\\.5")
+ "with-stdout-to opamBase64Compat.ml.6")
+ (("with-stdout-to opamBase64Compat\\.mli\\.5")
+ "with-stdout-to opamBase64Compat.mli.6"))))
(add-before 'build 'pre-build
(lambda* (#:key inputs make-flags #:allow-other-keys)
(let ((bash (assoc-ref inputs "bash"))
--
2.41.0
next prev parent reply other threads:[~2024-03-09 12:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 12:08 [bug#69677] [PATCH gnome-team 0/1] Fix opam on gnome-team Vivien Kraus via Guix-patches via
2024-03-09 9:46 ` Vivien Kraus via Guix-patches via [this message]
2024-03-09 18:18 ` [bug#69677] [PATCH gnome-team 1/1] gnu: opam: Fix build Maxim Cournoyer
2024-03-09 18:21 ` Vivien Kraus via Guix-patches via
2024-03-09 19:39 ` Vivien Kraus via Guix-patches via
2024-03-09 20:35 ` Liliana Marie Prikler
2024-03-09 21:29 ` Vivien Kraus via Guix-patches via
2024-03-09 21:35 ` Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a4e1befc3e3da925fccec1d88f53fff1ffff83b.1709986125.git.vivien@planete-kraus.eu \
--to=guix-patches@gnu.org \
--cc=69677@debbugs.gnu.org \
--cc=liliana.prikler@gmail.com \
--cc=maxim.cournoyer@gmail.com \
--cc=rg@raghavgururajan.name \
--cc=vivien@planete-kraus.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.