Does anyone have any tips for getting opam-monorepo to play nice with os-specific packages?
My project depends on eio and I develop on an M1 Mac, which means that my lockfile includes eio, eio_main, and eio_posix. This works fine until I try building a docker image, which fails due to eio_linux not being installed (technically it fails due to missing dependencies like uring, but you get the idea).
I know that I could simply opam install eio_linux in the Dockerfile, but that feels a little gross (and kinda negates the purpose of the lockfile). Is there a best practice here?
I should have read the docs better, sorry – it looks like lock (opam-monorepo.lock) had the info I needed.
However, opam monorepo lock --global-opam-vars '[[os-distribution,alpine],[os-family,alpine],[os,linux]]' $PACKAGE_NAME doesn’t seem to work (the lockfile still has eio_posix instead of eio_linux).
But interestingly enough, when explicitly set the global variable opam var --global os=linux, opam monorepo lock does the right thing. Maybe opam-monorepo isn’t plumbing this variable through all the way?