Nix package manager is getting into more and more platforms. It is now available on MacOS and android. Therefore I am considering to switch into nix based reproducible environments at work. However as a developer I need to release software releases for other platforms. How the one can produce a release of a software in a form of:
a debian or redhat package for FHS based distribution.
a dmg package for MacOS
The buildFHSUserEnv wouldn’t work on MacOS. Full blown VM would have the same problems as docker on mac (slow filesystem binds). PatchELF would be too hacky. Any other options?
Though on a Mac, you should be able to use Mac tooling to build Mac stuff. It’s not getting removed when you install nix, is it?
Usually project development involves setting up environment with all dependencies. We use different platforms in our team. Some people on Linux, others on MacOS. I am on a search for a tool which can fetch and install dependencies to create reproducible envirnoments. We also use different versions of some dependencies for different versions of a project. Development in docker is horrible on MacOS. I’ve considered:
nix
habitat
combination of direnv and bash to modify LD_PRELOAD (DYLD_INSERT_LIBRARIES on mac) and PATH
However I quickly discovered that none of the approaches really work. LD_PRELOAD hacks are to expensive to maintain. Habitat.sh and nix are producing binaries which cannot run on system which do not have nix (or habitat) installed. It looks like we need to forget about reproducible environments for now and stick to manual installation or spend time to develop the approach. Possible options: