cabal
cabal copied to clipboard
Error if `--enable-nix` is passed to `v2-command`
It probably (hopefully) does nothing, but seems to confuse at least one user.
Alternatively, make v2-build etc do what it says, i.e.
--enable-nix Enable Nix integration: run commands through
nix-shell if a 'shell.nix' file exists
EDIT: I think it could possibly work, if cabal-hash.txt picks everything relevant. Probably cache won't be hit that often though. Also one would require that ~/.cabal/store places indirect nix gc-roots. In short, I think it's hard to make --enable-nix work well, instead I'd recommend users to run nix-shell themselves and run cabal v2-* commands inside.
Similarly, we should error for
cabal --require-sandbox v2-build
Yeah, I did expect an option in cabal.project.local for that, or deprecation message in case it does nothing.
I just bumped into that.
cabal --enable-nix build
Does not seem to honor shell.nix. This should be an error.
The integration with nix was heavily discussed here: #4646 Throw an error is the very least thing we should do.