fpco / stackage-view

MIT License
21 stars 10 forks source link

how to build? #3

Open gregwebs opened 9 years ago

gregwebs commented 9 years ago

the README assumes the exe is already built. When I git clone and cabal install i see this:

cabal install
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: stackage-view-0.0.1 (user goal)
next goal: fpview (dependency of stackage-view-0.0.1)
Dependency tree exhaustively searched.
mgsloan commented 9 years ago

Coincidentally, I'm installing a newer version of stackage-view right now as well, and also ran into this. It looks like the renaming was partial, fixed by merging this PR: https://github.com/fpco/stackage-view/pull/2

gregwebs commented 9 years ago

language-javascript requires alex at install time, which I am quite used to. However, there seems to be a runtime dependency on GHCJS. I can't say that I have every actually installed ghcjs. Should there be a link to here?

https://github.com/ghcjs/ghcjs#install-ghcjs

gregwebs commented 9 years ago

hmm, ghcjs want 7.10. I am starting to think a docker image would be the best for this project

mgsloan commented 9 years ago

Hmm, it's surprising that GHCJS wants 7.10, I thought it also supports 7.8. Since you're still encountering build difficulties, I'll reopen this issue.

gregwebs commented 9 years ago

looks like I just needed the --max-backjumps flag mentioned in the ghcjs install documentation and things are installing with 7.8

varosi commented 9 years ago

Will that compile on Windows? I see that there is "unix" dependency.

gregwebs commented 9 years ago

ghcjs was working for me, but I ended up using the Dockerfile for it anyways. I have not got back to trying stackage-view yet. I am using Linux.

gregwebs commented 9 years ago

How does one run stackage-view after building with stack?

stack exec stackage-view
Point your browser to http://localhost:3000/
stackage-view: user error (Use of GHC's environment variable GHC_PACKAGE_PATH is incompatible with Cabal. Use the flag --package-db to specify a package database (it can be used multiple times).)
DanBurton commented 9 years ago

Stack exec sets that env variable, which cabal doesn't like. You'd notice the same if you tried to stack exec yesod devel, for example. Can the executable be run outside of the container?