I’ve been trying to keep up-to-date with the flakes RFC and I’ve got a question about it but the thread there seems to be getting too long, so I’d rather ask my question here.
I’m currently heavily relying on the possibility to pass options to nix-builds via the command line or via environment variables.
As far as I understand this is something that won’t be possible anymore when flakes are merged (at least not using
nix build, which will be flake based).
While I understand the implications of using impure builtins such as getEnv as part of a nix expression to go against the hermetic property of flakes, I don’t really understand why using explicit options on the command line is something that we cannot have anymore.
nix build #hermetic nix build --argstr extraFlags "-01 -someotheroption" #still hermetic apart from the explicit argument
Would someone shed some light on the why and sketch possible workarounds?