Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide option to not require package list from hackage.haskell.org #10638

Open
Skyfold opened this issue Dec 13, 2024 · 1 comment
Open

Provide option to not require package list from hackage.haskell.org #10638

Skyfold opened this issue Dec 13, 2024 · 1 comment

Comments

@Skyfold
Copy link

Skyfold commented Dec 13, 2024

Describe the feature request
I'm looking for global option or command line option that allows cabal to continue to function when dependencies are provided by nix and there is no package list from hackage.haskell.org. Unfortunatly, the offline option does not skip the required cabal update step. A reasonable solution would be to modify the offline flag to skip checking for a valid package list. (I have only tested with 3.12.1.0)

Additional context
The underlyning issue is that the new versions of cabal commands break the nix workflow, where nix provides all the dependecies and cabal only tries to build the project with the provided dependencies, no network requests. With version 3.12.1.0, cabal will silently pull in missing dependencies even when the offline flag is set. However, there is a workaround, setting active-repositories: :none option does prevent this. Sadly, no combination of options (including nix: True) removes the package set requirement.

@Skyfold
Copy link
Author

Skyfold commented Dec 13, 2024

I found a workaround for those who run into this, setting CABAL_CONFIG=/dev/null as an environment variable.

You can add this to your shellFor

CABAL_CONFIG = "/dev/null";

It still would be nice for --offline to allow for offline usage, but this works for now.

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

No branches or pull requests

1 participant