Skip to content

document CABAL_CONFIG env variable. #5322

Closed

Description

@gbaz

nix-shell works by setting a bunch of env variables. It would be nice if among those variables it could set would be one that directed cabal to use a config file other than in ~/.cabal/config. That way, we could tweak all of cabal's other settings at once to make it play nicely in the nix environment. This is potentially useful in other settings as well when some other tool wants to put cabal into a specific environment.

Activity

  1. added
    cabal-install: v2-build system
    on May 14, 2018
  2. sebright commented on May 14, 2018

    @sebright
    Collaborator

    CABAL_CONFIG overrides the config file location, though it looks like it's not documented:

    -- | Returns the config file path, without checking that the file exists.
    -- The order of precedence is: input flag, CABAL_CONFIG, default location.
    getConfigFilePath :: Flag FilePath -> IO FilePath

  3. hvr commented on May 14, 2018

    @hvr
    Member

    r elatedly, it may be useful to have such an env-var for setting the --project-file value via env as well

  4. gbaz commented on May 14, 2018

    @gbaz
    CollaboratorAuthor

    Great! cc @ElvishJerricco. Will leave this ticket open to record documenting it

  5. changed the title [-]Allow config file to be set by an env variable[/-] [+]document CABAL_CONFIG env variable.[/+] on May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cabal-install: nix integrationcabal-install: v2-build systemdocumentationtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions