How to install from a specific git branch with OPAM

I have a project that offers different functions in different branches of git. I believe that this is mainly done to simplify external dependencies (i.e. someone who wants to work with sqlite will not depend on modules for mysql, etc.). Unfortunately, the functionality that I need is not in the main.

Is there any way to tell OPAM to fetch a project from a specific branch during installation? If not, how can I add such a project to OPAM?

+5
source share
1 answer

Use an opam pin . Put the branch name after # , for example. use my OCaml tcpip library "checksum" tcpip instead of upstream:

 $ opam pin tcpip https://github.com/talex5/mirage-tcpip.git#checksum 
+6
source

Source: https://habr.com/ru/post/1200176/


All Articles