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

haskellPackages.callCabal2nix has no way to specify cabal2nix flags #46477

Closed
Taneb opened this issue Sep 10, 2018 · 3 comments
Closed

haskellPackages.callCabal2nix has no way to specify cabal2nix flags #46477

Taneb opened this issue Sep 10, 2018 · 3 comments

Comments

@Taneb
Copy link
Contributor

Taneb commented Sep 10, 2018

Issue description

Often when developing Haskell with nix, we want to specify cabal flags. There's currently haskell.lib.(en/dis)ableCabalFlag, but this can't change the build inputs, which causes frustrating breakages. The solution to this is to pass the flag to cabal2nix. haskellSrc2nix already has the extraCabal2nixOptions parameter, which does exactly this, but there's no way to prapogate this from callCabal2nix.

@cocreature
Copy link
Contributor

There are already two PRs that would fix this, so it seems like it’s just a question of merging one of these: #44424 and #42658

@Taneb
Copy link
Contributor Author

Taneb commented Sep 11, 2018

Closed by #44424

@Taneb Taneb closed this as completed Sep 11, 2018
@steve-chavez
Copy link
Member

Just find out the way to do this:

pkgs.haskell.lib.enableCabalFlag (pkgs.haskellPackages.callCabal2nix name src {}) "myflag";

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

No branches or pull requests

3 participants