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

Request for new package: haskell-ide-engine #31697

Closed
romildo opened this issue Nov 15, 2017 · 6 comments
Closed

Request for new package: haskell-ide-engine #31697

romildo opened this issue Nov 15, 2017 · 6 comments

Comments

@romildo
Copy link
Contributor

romildo commented Nov 15, 2017

Issue description

I would like to have haskell-ide-engine (HIE) added to nixpkgs, but I fear I am not knowledgeable enough to add it myself.

The Haskell IDE Engine is described in its home page by the following:

This project aims to be the universal interface to a growing number of Haskell tools, providing a full-featured and easy to query backend for editors and IDEs that require Haskell-specific functionality.

It is a requirement for Haskell development in Visual Studio Code using the extension Haskell Language Server, whose repository is Haskell Language Server Client.

@roberth
Copy link
Member

roberth commented Nov 15, 2017

@robinvd seems to have packaged haskell-ide-engine independently in https://github.com/robinvd/robinpkgs/tree/master/haskell-ide-engine. The last commit is only 24 days old and I have checked that it builds successfully against the NixOS unstable channel. That repo contains expressions referencing <nixpkgs>. It is not a nixpkgs fork or overlay.

Packaging it is not trivial because a number of packages / package versions is not on hackage, so we may need to consider all options to make installation easier:

  • Turn @robinvd's work into a proper overlay. I can help with that.
  • Remove vendored source code from that repo
  • Upstream everything his work into the haskell-ide-engine megarepo (if maintainers agree)
  • Integrate it into nixpkgs (which is what this issue is about)
  • Something else

It would be very nice to have hie in nixpkgs itself, so it can be discovered and used easily, so that should be the goal here.
@robinvd, how was your experience packaging hie? Do you think it would be a burden on nixpkgs?

@robinvd
Copy link

robinvd commented Nov 16, 2017

@roberth i tried only putting only .nix files in the repo, but the repo has sub packages. When nix tries to build those the licence file is in ../LICENSE and nix does not accept that (since only the sub package is copied into the nix store).

We would need a patch for coping the licence file and changing the .cabal files or make a pull request in the hie project

@robinvd, how was your experience packaging hie? Do you think it would be a burden on nixpkgs?

it was not difficult, for almost all my big haskell projects i make an out of tree nixpkgs like this one.

I had to run cabal2nix on every subpackage. Only thing is they use specific versions of dependencies (in the stack file you can see this). So i had to make a nix file based on the specific commit. Does nixpkgs allow non newest package dependencies?

I don't know if nixpkgs likes it if the tests are disabled, but multiple packages failed on the tests so i just wrapped everypackage in notest (also builds faster).

Upstream everything his work into the haskell-ide-engine megarepo (if maintainers agree)
Integrate it into nixpkgs (which is what this issue is about)

I like one of these options the best (or both). I can have a look at a patch for the license or make an issue at hie repo this weekend. I have no experiance with nixpkgs but would love to make a contribution to my daily OS that i use on all my devices.

@romildo if you want to build it right now you can: clone my repo and build it with nix-build default.nix -A haskell-ide-engine or add it to your nix-channel's (the channel url is https://github.com/robinvd/robinpkgs/archive/master.tar.gz). And then do nix-env -i haskell-ide-engine

@mrkgnao
Copy link
Contributor

mrkgnao commented Nov 18, 2017

I can confirm that @robinvd's package works fine.

@romildo
Copy link
Contributor Author

romildo commented Nov 18, 2017

It is not building on my unstable NixOS system:

$ nix-build default.nix -A haskell-ide-engine
[...]
Configuring brittany-0.8.0.3...
Setup: Encountered missing dependencies:
butcher >=1.1.0.0 && <1.2
checking for references to /tmp/nix-build-apply-refact-0.3.0.1.drv-0 in /nix/store/w9sr38x7m3bl5chij6j151dmlwnm0h2y-apply-refact-0.3.0.1...
builder for ‘/nix/store/jxb1653blsc1a161jkykyqj71xym5z8j-brittany-0.8.0.3.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/9jm643sv3xw1hfp1mkkzmfa31zypk1ry-hie-brittany-0.1.0.0.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/i4lr2z9hwfbc28lxzy825wrbind7p11m-haskell-ide-engine-0.1.0.0.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/i4lr2z9hwfbc28lxzy825wrbind7p11m-haskell-ide-engine-0.1.0.0.drv’ failed

@robinvd
Copy link

robinvd commented Nov 22, 2017

i came across a newer version of the same we are trying to do: haskell/haskell-ide-engine#117 (comment). @romildo maybe this builds on unstable?

@domenkozar
Copy link
Member

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

5 participants