What is the downside of using buildFHSUserEnv
to build packages? Packaging seems to require less work that way, but it isn’t the norm, so there must be a reason. Why aren’t most packages written with buildFHSUserEnv
? What’s the downside of using it?
For background, the buildFHSUserEnv
docs say:
buildFHSUserEnv
provides a way to build and run FHS-compatible lightweight sandboxes. It creates an isolated root with bound/nix/store
, so its footprint in terms of disk space needed is quite small. This allows one to run software which is hard or unfeasible to patch for NixOS – 3rd-party source trees with FHS assumptions, games distributed as tarballs, software with integrity checking and/or external self-updated binaries. It uses Linux namespaces feature to create temporary lightweight environments which are destroyed after all child processes exit, without root user rights requirement.