oasis2opam
oasis2opam copied to clipboard
Where does <pkg>.install belongs?
Forking the discussion on #29
For
.install, the OPAM manual indeed [talks about that file] (https://opam.ocaml.org/doc/Manual.html#packagenameinstall) without expressing a clear preference. A discussion — somewhere on Github I think — made clear however that <pkg>.install
files are not welcome in the opam-repository in order not to "pollute" everybody with extra files that may not be useful for them.
Not sure to understand where the
- in the upstream source? I don't see the use of it in there. Except for OPAM, it won't be useful (hence polluting the source).
- in the OPAM repository? I thought it was a good option. If you can point me to the right place for the mentioned discussion. that would be nice.
It is 1. See https://github.com/ocaml/oasis2opam/issues/24
An alternative may be to add commands to the opam
file to preserve (and then remove) the files. If oasis2opam
becomes a plugin, ocaml setup.ml -install -opam
(or similar) could just generate an <pkg>.install
file for opam to use.
You mean that we should generate a
I think that is totally do-able with an "Extra" plugin (just like the "META" plugin).
If we do it this way, the user will have to add this to its _oasis
file:
Plugins: oasis2opam (0.7), META (0.4)...
This will add some code in setup.ml
that can generate a
The opam
file generated need to invoke
$ ocaml setup.ml -configure --enable-opam-install
During the install, it will generate an extra
I think in this case, you don't have to move setup.*
into etc
and you can focus on only what has been installed.
N.B: this kind of plugin is an OASIS plugin (activated inside _oasis, rather than on command line).