[opam-devel] Package requires copying into a system directory

Daniel Bünzli daniel.buenzli at erratique.ch
Fri Aug 15 14:14:01 BST 2014


Le vendredi, 15 août 2014 à 12:14, Dario Teixeira a écrit :
> Anyway, my current approach is to use OPAM's support for post-messages
> to let the user know that the installation won't be complete until they
>  
> manually copy the sexp.outlang file [2]. Still, I'm wondering if someone
> has encountered a similar problem before and has a better solution.

If your build system generate an opam .install file, you can install files at an arbitrary absolute path on the system by specifiying a path in the `misc:` section (see section 2.2.3 of the opam developer manual).  

During install opam will then prompt the user if it allows to install the file at the given absolute path. I don't think this has been used much (if ever) so I don't know if it will ask you to sudo if it detects that it has not the privileges to install there (but I highly suspect the answer is no).

Best,

Daniel




More information about the opam-devel mailing list