hmemcpy / haskell-hie-devcontainer

A DevContainer for VSCode, for installing GHC 8.6.5, HIE (Haskell IDE Engine) and the required plugins
MIT License
165 stars 37 forks source link

How do I install packages? #3

Open maxrothman opened 4 years ago

maxrothman commented 4 years ago

As the title says. What's the recommended way to get this running for projects more complex than a single file? Should I install stack? Use the pre-installed nix? What's the expected workflow?

RichieAHB commented 4 years ago

Looks like stack on Alpine Linux is not that simple https://github.com/commercialhaskell/stack/issues/2387

lluki commented 4 years ago

At least cabal can be installed using sudo apk add cabal . I now simply run cabal run in a docker termina. I haven't used that setup yet to develop projects with complicated builds, I can't comment on how good this idea is...

DunetsNM commented 4 years ago

seems like stack for Alpine linux is available now? https://hub.docker.com/r/fpco/alpine-haskell-stack/tags

I'm not sure if it's possible to build both hie and alpine-haskell-stack into one image, afaik Docker doesn't allow multiple FROM in one Dockerfile (second image will overwrite first)?

Is it easy enough to combine them?

DunetsNM commented 4 years ago

Also tried to install stack inside image manually in VS Code terminal:

curl -sSL https://get.haskellstack.org/ | sh export PATH=$PATH:/usr/local/bin

it installs just fine however any stack commands give the same error

"no setup information found for ghc-8.6.5 on your platform. This probably means a GHC bindist has not yet been added for OS key 'linux64-ncurses6'. Supported versions: ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2"

GHC 8.6.5 is definitely installed though : ghc --version gives The Glorious Glasgow Haskell Compilation System, version 8.6.5

I guess the root cause is in the base image?

Douglasli commented 4 years ago

Also tried to install stack inside image manually in VS Code terminal:

curl -sSL https://get.haskellstack.org/ | sh export PATH=$PATH:/usr/local/bin

it installs just fine however any stack commands give the same error

"no setup information found for ghc-8.6.5 on your platform. This probably means a GHC bindist has not yet been added for OS key 'linux64-ncurses6'. Supported versions: ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2"

GHC 8.6.5 is definitely installed though : ghc --version gives The Glorious Glasgow Haskell Compilation System, version 8.6.5

I guess the root cause is in the base image?

I got the same issue