begriffs / haskell-vim-now

One-line Haskell Vim install
MIT License
988 stars 100 forks source link

installer support --nix parameter to be able running stack in nix-shell #285

Closed p-alik closed 6 years ago

p-alik commented 6 years ago

I've been able to solve the issue #284

$ ./install.sh --nix --repo git@github.com:p-alik/haskell-vim-now.git

begriffs commented 6 years ago

@p-alik thanks, this looks like it makes sense. By the way, does the --nix option make all the helper binaries build properly, including ghc-mod? We've had trouble with that one lately.

This PR needs a rebase against one of my changes. Also could you document your option in the Readme?

p-alik commented 6 years ago

By the way, does the --nix option make all the helper binaries build properly, including ghc-mod?

unfortunately no. The installation breaks on NixOS 17.09 and I couldn't solve the issue yet.

--- Installing plugins using vim-plug...
HvnArgs {hvnArgsNoHoogleDb = False, hvnArgsNoHelperBinaries = False}
Setting up GHC if needed...
/bin/sh: stack: command not found
Stack setup failed with error 127
*** setup_haskell.hs failed with error 1.
*** Aborting...

After installation vim complains on start:

[vimproc] vimproc's DLL: "/home/me/.config/haskell-vim-now/.vim/bundle/vimproc.vim/lib/vimproc_unix.so" is not found.  Please read :help vimproc and make it.        
ghcmod: vimproc.vim is not installed!

Both issues could be solved manually:

This PR needs a rebase against one of my changes.

done

Also could you document your option in the Readme?

also done.

I didn't mention it in README, but on NixOS you have to extend PATH variable to take over missing of curl-config exception:

*** Installer requires 'curl-config'. Please install and try again.
*** Aborting...

See can't find curl-config on NixOS

Installation instruction I use:

PATH=`nix-build --no-out-link "<nixpkgs>"   -A curl.dev`/bin:$PATH ./install.sh --repo git@github.com:p-alik/haskell-vim-now.git  --nix
jship commented 6 years ago

Hi @p-alik, I'd like to do a quick smoke test of the standard non-nix path with these changes and then we'll merge it in. I'll most likely test it tonight.

Thanks for your work!

p-alik commented 6 years ago

It's my please to contribute to the project I enjoy use for years ;-)

jship commented 6 years ago

Worked fine!