How to make opam repo add installs stable via a commit?

I saw commands like:

opam repo add coq-extra-dev https://coq.inria.fr/opam/extra-dev
# We don't need it in all opam switches due to incompatabilities: Run `opam repository add <coq-proj> --all-switches|--set-default' to use it in all existing switches, or in newly created switches, respectively. cmd: opam repository add coq-extra-dev --all-switches
opam repo add coq-released https://coq.inria.fr/opam/released
opam repo add psl-opam-repository https://github.com/uds-psl/psl-opam-repository.git

would putting the url with the commit work like it does for pin or should I just put the url with commit but use opam pin add?

e.g. as I did for cheerios?

opam pin add coq-cheerios git+https://github.com/uwplse/cheerios.git#9c7f66e57b91f706d70afa8ed99d64ed98ab367

I want to pin/fix all version so this never breaks again.

cross: How to make opam repo add installs stable via a commit? · Issue #87 · UCSD-PL/proverbot9001 · GitHub

The coq-extra-dev repository contains development packages without a stable version. You should not even look at this repository if your objective is reproducible build.

1 Like

As long as the url is a git repository (you can enforce that by prefixing them with git+https:// if needed), yes this works fine just the same way.