I have two short questions regarding real-world use of Nix flakes.
For local development, I have aUpon reviewing the documentation there’s a devShell attribute that can be used for this and seems to do what I intend
shell.nixfile with the libraries my C++ application depends on, along with supplemental tools such as a LSP server, code formatter, etc. There is a separate
default.nixfile that I use for release builds which omits these development dependencies. I have set up a Nix flake for my project, but it’s unclear to me how I would include these supplemental tools and make them available when using
nix develop. These tools should not be part of the output file that users receive, so where in the flake do they go?
For development, I use shared libraries for my application’s dependencies. For release, I use Nix to build a fully static binary using
pkgsMusl. The downside of this approach is that it requires building several large dependencies from source. Is there a way to specify two
flake.nixfiles, one of which can be used for development (dependencies are shared libraries) and another for the release build where everything is static?