mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-27 14:52:05 -05:00
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.
This commit is contained in:
parent
b35b661b89
commit
83e8fceb6c
1 changed files with 18 additions and 11 deletions
|
@ -2452,21 +2452,28 @@ (define-public ocamlify
|
||||||
(base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
|
(base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
|
||||||
(build-system ocaml-build-system)
|
(build-system ocaml-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:tests? #f; no tests
|
||||||
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'disable-safe-string
|
(delete 'configure)
|
||||||
;; Work around ‘Error: This expression has type string but an
|
(replace 'build
|
||||||
;; expression was expected of type bytes’ since OCaml 4.06.
|
;; 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 _
|
(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))
|
#t))
|
||||||
(delete 'check) ; tests are run during the build
|
(replace 'install
|
||||||
(replace 'configure
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(invoke "ocaml" "setup.ml" "-configure" "--prefix"
|
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
|
||||||
(assoc-ref outputs "out")))))))
|
(mkdir-p bin)
|
||||||
(native-inputs
|
(install-file "src/ocamlify" bin)
|
||||||
`(("ocamlbuild" ,ocamlbuild)))
|
#t))))))
|
||||||
(home-page "https://forge.ocamlcore.org/projects/ocamlify")
|
(home-page "https://forge.ocamlcore.org/projects/ocamlify")
|
||||||
(synopsis "Include files in OCaml code")
|
(synopsis "Include files in OCaml code")
|
||||||
(description "OCamlify creates OCaml source code by including
|
(description "OCamlify creates OCaml source code by including
|
||||||
|
|
Loading…
Reference in a new issue