Skip to content

Comment on Deploying an IHP Project to Fly.io

Comments

If you have the misfortune of using Windows or MacOS, you’ll need to use the following Dockerfile to build the image

Nix builds just fine on macos and I believe there's been some success with WSL as well, so that's not really a limitation.

(I’m the author) The issue isn’t nix builds in general, those work fine on MacOS, the issue is cross compiling a Linux docker image, which can be much trickier. I usually end up just relying on the github CI to build it, but nix has some nice remote builder functionality that might also be worth looking into.

Thanks for the post. I've been meaning to write up remote nix builders on macOS, especially now that going cross-OS (and cross-arch) is increasingly common, though still possible! Perhaps I'll try your tutorial with my builders and see how it goes.

WSL is not "Windows" at that point though.. From Docker's perspective you're building on Linux.

I think theres a downstream dependency that requires it. I just tested locally and the build fails with

error: getting status of '{...}/Config/nix/nixpkgs-config.nix': No such file or directory
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.