[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/07: gnu: ocamlify: Perform bootstrap build.
From: |
guix-commits |
Subject: |
06/07: gnu: ocamlify: Perform bootstrap build. |
Date: |
Tue, 10 Nov 2020 10:06:16 -0500 (EST) |
roptat pushed a commit to branch master
in repository guix.
commit 83e8fceb6c170969b28eb45e55413f83ea6b55fa
Author: Julien Lepiller <julien@lepiller.eu>
AuthorDate: Fri Oct 16 17:06:53 2020 +0200
gnu: ocamlify: Perform bootstrap build.
setup.ml is pre-generated in this package. Since it is generated by a
dependent package, we build manually. This will also allow us to build
this package properly with ocaml 4.11.
* gnu/packages/ocaml.scm (ocamlify): Perform bootstrap build.
---
gnu/packages/ocaml.scm | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f26376b..5a57b67 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2452,21 +2452,28 @@ radix-64 representation. It is specified in RFC 4648.")
(base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
(build-system ocaml-build-system)
(arguments
- `(#:phases
+ `(#:tests? #f; no tests
+ #:phases
(modify-phases %standard-phases
- (add-after 'unpack 'disable-safe-string
- ;; Work around ‘Error: This expression has type string but an
- ;; expression was expected of type bytes’ since OCaml 4.06.
+ (delete 'configure)
+ (replace 'build
+ ;; This package uses pre-generated setup.ml by oasis, but is
+ ;; a dependency of oasis. the pre-generated setup.ml is broken
+ ;; with recent versions of OCaml, so we perform a bootstrap instead.
(lambda _
- (setenv "OCAMLPARAM" "safe-string=0,_")
+ (substitute* "src/OCamlifyConfig.ml.ab"
+ (("$pkg_version") ,version))
+ (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
+ (with-directory-excursion "src"
+ (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
+ "ocamlify"))
#t))
- (delete 'check) ; tests are run during the build
- (replace 'configure
+ (replace 'install
(lambda* (#:key outputs #:allow-other-keys)
- (invoke "ocaml" "setup.ml" "-configure" "--prefix"
- (assoc-ref outputs "out")))))))
- (native-inputs
- `(("ocamlbuild" ,ocamlbuild)))
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+ (mkdir-p bin)
+ (install-file "src/ocamlify" bin)
+ #t))))))
(home-page "https://forge.ocamlcore.org/projects/ocamlify")
(synopsis "Include files in OCaml code")
(description "OCamlify creates OCaml source code by including
- branch master updated (be0ebf3 -> 0a173fe), guix-commits, 2020/11/10
- 03/07: guix: ocaml: Add package-with-ocaml4.09., guix-commits, 2020/11/10
- 04/07: gnu: laby: Update to 0.7.0., guix-commits, 2020/11/10
- 02/07: gnu: Add ocaml4.09-findlib., guix-commits, 2020/11/10
- 05/07: gnu: ocaml-ppx-tools-versioned: Use release profile., guix-commits, 2020/11/10
- 07/07: gnu: ocaml: Switch to 4.11 by default., guix-commits, 2020/11/10
- 06/07: gnu: ocamlify: Perform bootstrap build.,
guix-commits <=
- 01/07: gnu: ocaml: Update to 4.11.1., guix-commits, 2020/11/10