Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute through OPAM? #416

Closed
Niols opened this issue Apr 5, 2023 · 3 comments
Closed

Distribute through OPAM? #416

Niols opened this issue Apr 5, 2023 · 3 comments
Assignees

Comments

@Niols
Copy link
Member

Niols commented Apr 5, 2023

I think that, at this point, that is at a point where Topiary is not present in most package managers, it would be interesting to be able to install Topiary with OPAM -- OCaml Package Manager.

OPAM is not really meant to distribute non-OCaml packages, but I have seen it be used to distribute packages that are useful to the OCaml community and that should be system packages but that have special constraints (eg. they are not really present in system package manager, or there is the need to be able to install several versions), so I think this might be welcome.

I'll happily take care of the initial investigation to know whether that'd be welcome. The actual distribution would probably require #415.

This was first mentioned in #254.

@Niols Niols self-assigned this Apr 5, 2023
@Niols
Copy link
Member Author

Niols commented Apr 5, 2023

I self-assigned this for now; I will go investigate whether that'd be welcome and report here.

@Niols
Copy link
Member Author

Niols commented May 2, 2023

I brought this discussion to discuss.ocaml.org and the answers are quite interesting. The first answers seem to show that:

  • Distributing binaries via OPAM is not really welcome. This does not mean that we shouldn't provide binaries in other package registries or just for people to download if they wish.

  • Tezos does distribute some Rust libraries via OPAM. Since OPAM is actually language-agnostic, it is possible to create a package that calls cargo. One problem is then that Cargo has to be provided by the system (which might not contain the right version). Another problem is that Cargo downloads stuff during the installation, which is not allowed in OPAM's sandbox. Tezos's project solves this by vendoring everything, but I don't know how easy that is.

I will give a try to this second idea.

@Niols
Copy link
Member Author

Niols commented May 17, 2023

The ideas above led to the creation of tweag/topiary-opam which aims at being very easy to maintain. I then opened a PR on opam-repository which has just now been merged: Topiary is in OPAM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant