Skip to content

Error if --enable-nix is passed to v2-command #6444

Open

Description

@phadej

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.

Activity

  1. phadej commented on Dec 18, 2019

    @phadej
    CollaboratorAuthor

    Similarly, we should error for

    cabal --require-sandbox v2-build
    
  2. Pitometsu commented on Dec 18, 2019

    @Pitometsu

    Yeah, I did expect an option in cabal.project.local for that, or deprecation message in case it does nothing.

  3. dschrempf commented on Jun 1, 2021

    @dschrempf

    I just bumped into that.

    cabal --enable-nix build
    

    Does not seem to honor shell.nix. This should be an error.

  4. jneira commented on Mar 23, 2022

    @jneira
    Member

    The integration with nix was heavily discussed here: #4646
    Throw an error is the very least thing we should do.

  5. swinilohani616-dot commented on Nov 9, 2026

    @swinilohani616-dot
    Contributor

    Hi! I came across this issue and noticed that Nix integration was deprecated in #9205 and later removed in #11191.

    Since --enable-nix is no longer supported, it looks like this issue is no longer relevant.

    Would it make sense to close this now, or is there anything I'm missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions