Managing external dependencies on macOS

Hi there,

Recently I wanted to install the cvc5 package. It depends on conf-python3-pyparsing, which is marked as != macos. I tried to see why this is, and it seems to be because it (naturally) requires the pyparsing library to be installed. Currently I believe opam external dependencies on macOS are managed with homebrew, however homebrew does not have this python package.

I tried to contribute this package to homebrew, however they no longer support python packages in general. Should the way external dependencies are managed on macOS change because of this? I seem to have hit a wall resolving my “dependency tree“ for installing the cvc5 library on macOS.

More interestingly, I happen to not use homebrew to manage dependencies, and I use instead opam-nix. However this seems to completely block me as a macOS user. I was wondering if anyone had tips on how to resolve this, and whether maybe defaulting to homebrew being associated with macOS is no longer the way to go.

Thanks!

Tiago

I think this is an error in opam-repository. conf-* pakages shouldn’t be marked unavailable on platforms that happen to not package them unless it happens to be a tool or feature uninstallable on these platforms (e.g. conf-linux-libc-dev).

Would you be able to open a PR to update conf-python3-pyparsing’s definition by removing the available: field and replacing it with x-ci-accept-failures: ["macos-homebrew"] ?

That makes sense, will do, thank you!

On that note I came across this article on opam’s nix support, which sounds super exciting! I was wondering, is there some hope that this could work for macOS, or is this only for NixOS?

Great question. We haven’t specifically tested nix on macOS but it should work.
If you have opam >= 2.4.0 you should be able to try it out using:

opam var --global os-distribution=nixos
opam var --global os-family=nixos

However note that there are currently no CI running on opam-repository that test this combination, so occasional failures might occur.

Will give that a try, thanks!

In any case this is probably great for opam-nix too. Currently macOS dependencies are mapped to equivalent nixpkgs dependencies. However it should be adapted to use the nixos entry directly if available.