tweag / opam-nix

Turn opam-based OCaml projects into Nix derivations
MIT License
111 stars 33 forks source link

Installing an old version of Coq via opam-nix fails, related to coq-stdlib #48

Closed Coda-Coda closed 1 year ago

Coda-Coda commented 1 year ago

Describe the bug Old versions of Coq listed in an opam file fail to install, likely due to: 5bfdc95cfb7662cac808eb1baa70ae3fff0cab4f ocaml.nix - line 133 and that coq-stdlib is only for newer versions of Coq.

To Reproduce An opam file with: "coq" {>= "8.10" & < "8.11.0" } fails to build when following the standard instructions in the README of opam-nix with the error: error: attribute 'coq-stdlib' missing.

It seems that coq-of-ocaml is possibly meant as an alternative to writing coq. Using this still does not work, giving the error No agreement on the version of coq-of-ocaml.

(Using nix develop to trigger a build of Coq).

Expected behavior An opam file with "coq" {>= "8.10" & < "8.11.0" } would succeed at building Coq following the instructions of the README.

Environment

Additional context Reverting 5bfdc95cfb7662cac808eb1baa70ae3fff0cab4f fixes the issue.

balsoft commented 1 year ago

Hi, thanks for reporting!

Should be fixed now. Could you confirm and reopen otherwise?

Coda-Coda commented 1 year ago

Hi @balsoft, thanks for the fix! Yes I can confirm that does fix this issue. However, I've now raised #49 which is related. I did try to fix it myself but was not able to.