Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

got ghc-mod working with nix #928

Closed
wants to merge 3 commits into from
Closed

Conversation

chessai
Copy link

@chessai chessai commented Feb 22, 2018

I added a nix expression that allows building ghc-mod with nix. It does not affect the code, however, a few of your dependencies have what I believe are unnecessarily low upper bounds. They are:

hlint, monad-journal, optparse-applicative, extra, and haskell-src-exts.

The reason I say that these bounds are unnecessarily low is that ghc-mod can build with their newest versions.

@DanielG
Copy link
Owner

DanielG commented Feb 25, 2018

Maybe I'm a bit confused about how things are supposed to work with Nix but why are you PRing this here instead of over at nixpkgs?

As for the over-restrictive bounds I'd be happy to merge a PR that just bumps the related dependencies if you tested that everything builds and works with them.

@chessai
Copy link
Author

chessai commented Feb 25, 2018 via email

@peti
Copy link
Contributor

peti commented Mar 13, 2018

I don't understand the purpose of this PR. ghc-mod.nix is an auto-generated file that downloads the ghc-mod source code from github even though it's supposed to be living inside of that source code. This feels counter-intuitive, at best. Also, Nixpkgs has build instructions for ghc-mod already, so why bother duplicating them here? Maybe I am missing something?

@chessai
Copy link
Author

chessai commented Mar 13, 2018

@peti, it's possible I've made a mistake, but when installing ghc-mod with 'nix-env -iA nixos.haskellPackages.ghc-mod', ghc-mod failed to build.

Looking at that nixpkgs issue which referenced this PR, I can see that the problem is fixed.

When I made this PR, I didn't go to nixpkgs because I thought nixpkgs was pulling ghc-mod from Hackage. Now I know that assumption is incorrect.

Also, this is probably the wrong place to make the PR anyway. I apologise.

@chessai chessai closed this Mar 13, 2018
@peti
Copy link
Contributor

peti commented Mar 13, 2018

When I made this PR, I didn't go to nixpkgs because I thought nixpkgs was pulling ghc-mod from Hackage.

Nixpkgs does pull ghc-mod from Hackage. If ghc-mod would release an update to Hackage that fixes the overspecified constraint on hlint, then that would have automatically fixed the build failure we experienced in the release-17.09 branch. Alas, no such update seems to be forthcoming, so we worked around the issue by patching the build inside of Nixpkgs to just ignore the upstream version constraints, and now it succeeds again.

@DanielG
Copy link
Owner

DanielG commented Apr 23, 2018

@peti sorry for the late reply, but wouldn't a hackage revision suffice for a bounds issue? Does your tooling not pick those up or something? I'd be happy to bump them bounds if anyone actually notified me of any problems!

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

Successfully merging this pull request may close these issues.

3 participants