[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ocaml-stdlib-shims: setting paths for a Coq package

From: Garek Dyszel
Subject: ocaml-stdlib-shims: setting paths for a Coq package
Date: Sat, 02 Sep 2023 14:52:21 -0400

Hi Guix,

While trying to package coq-elpi, one finds that Findlib is unable to
find ocaml-stdlib-shims. The problem persists even if ocaml-stdlib-shims
is located in the inputs and propagated-inputs fields.

Trying to set OCAMLLIB using the following doesn't seem to work.
(string-append "OCAMLLIB=$OCAMLLIB:" 
               #$(this-package-input "ocaml-stdlib-shims"))

Which environment variable should we be setting so that
ocaml-stdlib-shims can be picked up by Coq?

I can include the whole package file from which this question is
originating if it would help, but there are about 20 packages in there;
I don't want to force anybody to read it unless we really have to :)


Make flags for coq-elpi
--8<---------------cut here---------------start------------->8---
;; Most of the package definition omitted...
(arguments ;;...
`(#:make-flags ,#~(list (string-append "COQBIN="
                                            #$(this-package-input "coq-core")
                             (string-append "ELPIDIR="
                                            #$(this-package-input "ocaml-elpi")
                             (string-append "COQLIBINSTALL="
                             (string-append "COQMF_COQLIB="
                             (string-append "OCAMLLIB=$OCAMLLIB:" 
                             (string-append "COQPLUGININSTALL="
--8<---------------cut here---------------end--------------->8---

Adjusted arguments for ocaml-stdlib-shims (adding the phase install-meta
doesn't seem to fix the problem)
--8<---------------cut here---------------start------------->8---
(define-public ocaml-stdlib-shims
    (name "ocaml-stdlib-shims")
    (version "0.3.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "";)
                     (commit version)))
              (file-name (git-file-name name version))
    (build-system dune-build-system)
                 (modify-phases %standard-phases
                   (delete 'configure)
                   (add-after 'install 'install-meta
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let ((out (assoc-ref outputs "out")))
                             (string-append out 
                           (lambda _
                              "package \"stdlib-shims\" (
                              description = \"Stdlib shims\"
                              requires = \"\"
                              archive(byte) = \"stdlib_shims.cma\"
                              archive(native) = \"stdlib_shims.cmxa\"
                              plugin(byte) = \"stdlib_shims.cma\"
                              plugin(native) = \"stdlib_shims.cmxs\"
    (home-page "";)
    (synopsis "OCaml stdlib features backport to older OCaml compilers")
    (description "This package backports some of the new stdlib features to
older compilers, such as the Stdlib module.  This allows projects that require
compatibility with older compiler to use these new features in their code.")
    ;; with ocaml-linking exception
    (license license:lgpl2.1+)))
--8<---------------cut here---------------end--------------->8---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]