[opam-devel] global installation with opam
thomas at gazagnaire.org
Wed Dec 10 23:30:29 GMT 2014
> I do wonder why Thomas thinks that OPAMROOT is a bad solution though. It
> seems quite clean to me -- you can have an OPAM installation pointing to
> (e.g.) /usr/local/opam and either add that your global PATH or symlink binaries
> into /usr/local/bin.
you can indeed have things under /usr/local/opam, but what you might want is to have libs in /usr/local/lib, binaries in /usr/local/bin to integrate with your system better etc... homebrew solves this by taking ownership of /usrl/local, but we clearly don't want this for opam (I think) :-)
I think having a special "global" switch could makes sense and could be implemented without too much hassle. Need to special case https://github.com/ocaml/opam/blob/master/src/core/opamPath.ml to use global paths. Requiring the user to install ocaml and ocamlfind only could help (so we need to implement a the detection of an "external" ocamlfind) as we don't need to support other external ocaml libs (which can become a pain when you want to upgrade ...).
So I think that adding that kind of limited support for global packages could makes sense and is not too hard to do.
> This could be scripted up with a fairly trivial shell script (caveat: that I
> haven't actually written).
>> On 10 Dec 2014, at 23:12, Thomas Gazagnaire <thomas at gazagnaire.org> wrote:
>> A (bad) solution is to set change OPAMROOT to an appropriate location.
>> Thanks for the write-up, this is very helpful to understand the use-cases. I've created https://github.com/ocaml/opam/issues/1895 to track that.
>>> On 10 Dec 2014, at 13:16, Simon Cruanes <simon.cruanes.2007 at m4x.org> wrote:
>>> Is there a blessed way to install packages system-wide using Opam? I
>>> suspect there isn't, so I attached a document  that describes my
>>> use-cases and what I'm thinking of (of course I know you opam
>>> developers are busy).
>>>  http://cedeela.fr/~simon/files/opam_system.html
>>> or joined file
>>> key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3 7D8D 4AC0 1D08 49AA 62B6
>>> opam-devel mailing list
>>> opam-devel at lists.ocaml.org
>> opam-devel mailing list
>> opam-devel at lists.ocaml.org
More information about the opam-devel