ghcjs / ghcjs-dom-hello

GHCJS DOM Hello World, an example package
MIT License
10 stars 11 forks source link

Please add install instructions. #6

Open VictorTaelin opened 8 years ago

VictorTaelin commented 8 years ago

I've tried installing it on OSX El Captain. I used stack init --solver; stack build and got:

Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin)."

I installed it through stack and got:

The program 'pkg-config' version >=0.9.0 is required but it could not be found.

I installed it through homebrew and got:

The pkg-config package 'cairo' version >=1.2.0 is required but it could not be found.

I don't know how I'm supposed to proceed. Seems like I am missing something here. Please add install instructions.

bergey commented 8 years ago

Thanks for the report. stack is trying to build with GHC instead of GHCJS, and therefore trying to pull in some C libraries that you don't need if you intend to use GHCJS. Try the following stack.yaml and let us know if you run into further problems.

# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md

# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: ghcjs-0.2.0.20151029_ghc-7.10.2
compiler-check: match-exact
setup-info:
  ghcjs:
      source:
            ghcjs-0.2.0.20151029_ghc-7.10.2:
                    url: "https://github.com/nrolland/ghcjs/releases/download/v0.2.0.20151029/ghcjs-0.2.0.20151029.tar.gz"

# Local packages, usually specified by relative directory name
packages:
  - '.'

extra-deps:
- ghcjs-dom-0.2.3.0

@hamishmack What do you think of adding a stack.yaml to make this more straightforward?