31 points · by rrampage · 3y ago · 6 comments
Clearly you haven't touched OpenGL. Nix apps on non-nixos need a wrapper to use OpenGL and what's worse is that you need a different wrapper for each GPU vendor
How much effort had to go into the Nix expression to make the image smaller, compared to what you'd do with a Dockerfile?
I'm guessing you / your team is otherwise already familiar with Nix?
I followed the guide here
https://nixos.org/guides/building-and-running-docker-images....
I ended up with an expression that built an image with my program that took the arch as a parameter.
You can see it here
https://github.com/openenergysolutions/openfmb.adapters/blob... and dig in if you like.
I'd misread the title, & thought this would be about using nixpkgs' dockerTools.
https://nix.dev/tutorials/building-and-running-docker-images
I would assume that the resulting image is about the same, but you wouldn't need a bespoke Dockerfile. The downsides being that you'd need to know nix to maintain it (which you would anyway with this approach), and you'd need `nix` rather than `docker` to build the image.