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

Add callCabal2Nix to haskell packages #22191

Closed
wants to merge 1 commit into from
Closed

Conversation

3noch
Copy link
Contributor

@3noch 3noch commented Jan 27, 2017

This is long overdue. I see it everywhere in people's source code but it's not in nixpkgs (yet). Ref #19958.

I'm sure there all sorts of ways to improve this to make it suitable for inclusion in nixpkgs. But I wanted to get the ball rolling.

@mention-bot
Copy link

@3noch, thanks for your PR! By analyzing the history of the files in this pull request, we identified @peti, @oxij and @aske to be potential reviewers.

@3noch
Copy link
Contributor Author

3noch commented Jan 27, 2017

@peti
Copy link
Member

peti commented Jan 29, 2017

That function seems somewhat inferior to the hackage2nix function located some ~10 lines of code above it in pkgs/development/haskell-modules/default.nix.

@ElvishJerricco
Copy link
Contributor

It's used to call packages that aren't on Hackage. For example, pulling something from github and using cabal2nix on it. I use it in the default.nix of my projects so that I don't have to keep manually doing cabal2nix on my cabal file.

@3noch
Copy link
Contributor Author

3noch commented Jan 29, 2017

@peti I think you're right. I could copy hackage2nix and get rid of the dependency on Hackage, or I could refactor it to support both use cases. Do you have a preference?

@peti
Copy link
Member

peti commented Jan 29, 2017 via email

@3noch
Copy link
Contributor Author

3noch commented Jan 31, 2017

@peti Updated. What do you think of this?

@peti
Copy link
Member

peti commented Jan 31, 2017

Yes, that patch looks fine! One minor nitpick: other functions use the spelling hackage2nix, i.e. the "nix" bit isin all lower-case, so I'd prefer the spelling callCabal2nix over callCabal2Nix for the sake of consistency. Does that make sense?

@peti peti self-assigned this Jan 31, 2017
@peti peti added this to the 17.03 milestone Jan 31, 2017
@3noch
Copy link
Contributor Author

3noch commented Jan 31, 2017

@peti I noticed that myself. I'll change it.

@3noch
Copy link
Contributor Author

3noch commented Jan 31, 2017

Done.

@peti
Copy link
Member

peti commented Jan 31, 2017

Merged to haskell-updates for testing in http://hydra.nixos.org/jobset/nixpkgs/haskell-updates. This patch will make it into master within a day or two -- assuming that nothing breaks. :-)

@peti peti closed this in 05ee547 Feb 1, 2017
domenkozar pushed a commit that referenced this pull request Feb 3, 2017
Closes #22191.

(cherry picked from commit 05ee547)
Signed-off-by: Domen Kožar <domen@dev.si>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants